├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md └── move.yml ├── CMakeLists.txt ├── build.jam ├── doc ├── .gitignore ├── Jamfile.v2 ├── asio.qbk ├── doxy2qbk.pl ├── examples.qbk ├── history.qbk ├── index.xml ├── model_dox.txt ├── net_ts.qbk ├── noncopyable_dox.txt ├── overview.qbk ├── overview │ ├── allocation.qbk │ ├── async.qbk │ ├── async_op1.dot │ ├── async_op1.png │ ├── async_op2.dot │ ├── async_op2.png │ ├── basics.qbk │ ├── bsd_sockets.qbk │ ├── buffers.qbk │ ├── cancellation.qbk │ ├── channels.qbk │ ├── compose.qbk │ ├── configuration.qbk │ ├── coro.qbk │ ├── coroutine.qbk │ ├── cpp2011.qbk │ ├── cpp20_coroutines.qbk │ ├── deferred.qbk │ ├── files.qbk │ ├── futures.qbk │ ├── handler_tracking.qbk │ ├── immediate_completion.qbk │ ├── implementation.qbk │ ├── iostreams.qbk │ ├── line_based.qbk │ ├── model.qbk │ ├── model │ │ ├── allocators.qbk │ │ ├── associators.qbk │ │ ├── async_agent_chain.png │ │ ├── async_agent_model.png │ │ ├── async_agents.qbk │ │ ├── async_child_agent_chain.png │ │ ├── async_op_init_complete.png │ │ ├── async_op_model.png │ │ ├── async_op_phases.png │ │ ├── async_op_trivial_chain.png │ │ ├── async_ops.qbk │ │ ├── cancellation.qbk │ │ ├── child_agents.qbk │ │ ├── completion_token_model.png │ │ ├── completion_token_transform.png │ │ ├── completion_tokens.qbk │ │ ├── executors.qbk │ │ ├── higher_level_model.png │ │ ├── higher_levels.qbk │ │ └── library_elements.qbk │ ├── other_protocols.qbk │ ├── parallel_group.qbk │ ├── pipes.qbk │ ├── posix.qbk │ ├── proactor.dot │ ├── proactor.png │ ├── promises.qbk │ ├── protocols.qbk │ ├── rationale.qbk │ ├── reactor.qbk │ ├── serial_ports.qbk │ ├── signals.qbk │ ├── spawn.qbk │ ├── ssl.qbk │ ├── strands.qbk │ ├── streams.qbk │ ├── sync_op.dot │ ├── sync_op.png │ ├── threads.qbk │ ├── timers.qbk │ ├── token_adapters.qbk │ ├── type_erasure.qbk │ └── windows.qbk ├── platform_macros.pl ├── platform_macros.qbk ├── quickref.xml ├── reference.dox ├── reference.qbk ├── reference.xsl ├── requirements.qbk ├── requirements │ ├── AcceptHandler.qbk │ ├── AcceptToken.qbk │ ├── AcceptableProtocol.qbk │ ├── AsyncRandomAccessReadDevice.qbk │ ├── AsyncRandomAccessWriteDevice.qbk │ ├── AsyncReadStream.qbk │ ├── AsyncWriteStream.qbk │ ├── BufferedHandshakeHandler.qbk │ ├── BufferedHandshakeToken.qbk │ ├── CancellationHandler.qbk │ ├── CancellationSlot.qbk │ ├── CompletionCondition.qbk │ ├── ConnectCondition.qbk │ ├── ConnectHandler.qbk │ ├── ConnectToken.qbk │ ├── ConstBufferSequence.qbk │ ├── Disposition.qbk │ ├── DynamicBuffer.qbk │ ├── DynamicBuffer_v1.qbk │ ├── DynamicBuffer_v2.qbk │ ├── Endpoint.qbk │ ├── EndpointSequence.qbk │ ├── ExecutionContext.qbk │ ├── Executor.qbk │ ├── GettableSerialPortOption.qbk │ ├── GettableSocketOption.qbk │ ├── Handler.qbk │ ├── HandshakeHandler.qbk │ ├── HandshakeToken.qbk │ ├── InternetProtocol.qbk │ ├── IoControlCommand.qbk │ ├── IoObjectService.qbk │ ├── IteratorConnectHandler.qbk │ ├── IteratorConnectToken.qbk │ ├── MoveAcceptHandler.qbk │ ├── MoveAcceptToken.qbk │ ├── MutableBufferSequence.qbk │ ├── NullaryToken.qbk │ ├── ProtoAllocator.qbk │ ├── Protocol.qbk │ ├── RangeConnectHandler.qbk │ ├── RangeConnectToken.qbk │ ├── ReadHandler.qbk │ ├── ReadToken.qbk │ ├── ResolveHandler.qbk │ ├── ResolveToken.qbk │ ├── Service.qbk │ ├── SettableSerialPortOption.qbk │ ├── SettableSocketOption.qbk │ ├── ShutdownHandler.qbk │ ├── ShutdownToken.qbk │ ├── SignalHandler.qbk │ ├── SignalToken.qbk │ ├── SyncRandomAccessReadDevice.qbk │ ├── SyncRandomAccessWriteDevice.qbk │ ├── SyncReadStream.qbk │ ├── SyncWriteStream.qbk │ ├── TimeTraits.qbk │ ├── WaitHandler.qbk │ ├── WaitToken.qbk │ ├── WaitTraits.qbk │ ├── WriteHandler.qbk │ ├── WriteToken.qbk │ ├── asynchronous_operations.qbk │ ├── asynchronous_socket_operations.qbk │ ├── read_write_operations.qbk │ └── synchronous_socket_operations.qbk ├── std_exception_dox.txt ├── std_executors.qbk ├── tutorial.dox ├── tutorial.qbk ├── tutorial.xsl └── using.qbk ├── example ├── cpp11 │ ├── allocation │ │ ├── Jamfile.v2 │ │ └── server.cpp │ ├── buffers │ │ ├── Jamfile.v2 │ │ └── reference_counted.cpp │ ├── build.jam │ ├── chat │ │ ├── Jamfile.v2 │ │ ├── chat_client.cpp │ │ ├── chat_message.hpp │ │ ├── chat_server.cpp │ │ └── posix_chat_client.cpp │ ├── deferred │ │ ├── Jamfile.v2 │ │ ├── deferred_1.cpp │ │ └── deferred_2.cpp │ ├── echo │ │ ├── Jamfile.v2 │ │ ├── async_tcp_echo_server.cpp │ │ ├── async_udp_echo_server.cpp │ │ ├── blocking_tcp_echo_client.cpp │ │ ├── blocking_tcp_echo_server.cpp │ │ ├── blocking_udp_echo_client.cpp │ │ └── blocking_udp_echo_server.cpp │ ├── executors │ │ ├── Jamfile.v2 │ │ ├── actor.cpp │ │ ├── bank_account_1.cpp │ │ ├── bank_account_2.cpp │ │ ├── fork_join.cpp │ │ ├── pipeline.cpp │ │ └── priority_scheduler.cpp │ ├── files │ │ ├── Jamfile.v2 │ │ ├── async_file_copy.cpp │ │ └── blocking_file_copy.cpp │ ├── fork │ │ ├── Jamfile.v2 │ │ ├── daemon.cpp │ │ └── process_per_connection.cpp │ ├── futures │ │ ├── Jamfile.v2 │ │ └── daytime_client.cpp │ ├── handler_tracking │ │ ├── Jamfile.v2 │ │ ├── async_tcp_echo_server.cpp │ │ └── custom_tracking.hpp │ ├── http │ │ ├── client │ │ │ ├── Jamfile.v2 │ │ │ ├── async_client.cpp │ │ │ └── sync_client.cpp │ │ ├── doc_root │ │ │ ├── data_1K.html │ │ │ ├── data_2K.html │ │ │ ├── data_4K.html │ │ │ └── data_8K.html │ │ ├── server │ │ │ ├── Jamfile.v2 │ │ │ ├── connection.cpp │ │ │ ├── connection.hpp │ │ │ ├── connection_manager.cpp │ │ │ ├── connection_manager.hpp │ │ │ ├── header.hpp │ │ │ ├── main.cpp │ │ │ ├── mime_types.cpp │ │ │ ├── mime_types.hpp │ │ │ ├── reply.cpp │ │ │ ├── reply.hpp │ │ │ ├── request.hpp │ │ │ ├── request_handler.cpp │ │ │ ├── request_handler.hpp │ │ │ ├── request_parser.cpp │ │ │ ├── request_parser.hpp │ │ │ ├── server.cpp │ │ │ └── server.hpp │ │ ├── server2 │ │ │ ├── Jamfile.v2 │ │ │ ├── connection.cpp │ │ │ ├── connection.hpp │ │ │ ├── header.hpp │ │ │ ├── io_context_pool.cpp │ │ │ ├── io_context_pool.hpp │ │ │ ├── main.cpp │ │ │ ├── mime_types.cpp │ │ │ ├── mime_types.hpp │ │ │ ├── reply.cpp │ │ │ ├── reply.hpp │ │ │ ├── request.hpp │ │ │ ├── request_handler.cpp │ │ │ ├── request_handler.hpp │ │ │ ├── request_parser.cpp │ │ │ ├── request_parser.hpp │ │ │ ├── server.cpp │ │ │ └── server.hpp │ │ ├── server3 │ │ │ ├── Jamfile.v2 │ │ │ ├── connection.cpp │ │ │ ├── connection.hpp │ │ │ ├── header.hpp │ │ │ ├── main.cpp │ │ │ ├── mime_types.cpp │ │ │ ├── mime_types.hpp │ │ │ ├── reply.cpp │ │ │ ├── reply.hpp │ │ │ ├── request.hpp │ │ │ ├── request_handler.cpp │ │ │ ├── request_handler.hpp │ │ │ ├── request_parser.cpp │ │ │ ├── request_parser.hpp │ │ │ ├── server.cpp │ │ │ └── server.hpp │ │ └── server4 │ │ │ ├── Jamfile.v2 │ │ │ ├── file_handler.cpp │ │ │ ├── file_handler.hpp │ │ │ ├── header.hpp │ │ │ ├── main.cpp │ │ │ ├── mime_types.cpp │ │ │ ├── mime_types.hpp │ │ │ ├── reply.cpp │ │ │ ├── reply.hpp │ │ │ ├── request.hpp │ │ │ ├── request_handler.cpp │ │ │ ├── request_handler.hpp │ │ │ ├── request_parser.cpp │ │ │ ├── request_parser.hpp │ │ │ ├── server.cpp │ │ │ └── server.hpp │ ├── icmp │ │ ├── Jamfile.v2 │ │ ├── icmp_header.hpp │ │ ├── ipv4_header.hpp │ │ └── ping.cpp │ ├── invocation │ │ ├── Jamfile.v2 │ │ └── prioritised_handlers.cpp │ ├── iostreams │ │ ├── Jamfile.v2 │ │ ├── daytime_client.cpp │ │ ├── daytime_server.cpp │ │ └── http_client.cpp │ ├── local │ │ ├── Jamfile.v2 │ │ ├── connect_pair.cpp │ │ ├── fd_passing_stream_client.cpp │ │ ├── fd_passing_stream_server.cpp │ │ ├── iostream_client.cpp │ │ ├── stream_client.cpp │ │ └── stream_server.cpp │ ├── multicast │ │ ├── Jamfile.v2 │ │ ├── receiver.cpp │ │ └── sender.cpp │ ├── nonblocking │ │ ├── Jamfile.v2 │ │ └── third_party_lib.cpp │ ├── operations │ │ ├── Jamfile.v2 │ │ ├── composed_1.cpp │ │ ├── composed_2.cpp │ │ ├── composed_3.cpp │ │ ├── composed_4.cpp │ │ ├── composed_5.cpp │ │ ├── composed_6.cpp │ │ ├── composed_7.cpp │ │ └── composed_8.cpp │ ├── parallel_group │ │ ├── Jamfile.v2 │ │ ├── ranged_wait_for_all.cpp │ │ ├── wait_for_all.cpp │ │ ├── wait_for_one.cpp │ │ ├── wait_for_one_error.cpp │ │ └── wait_for_one_success.cpp │ ├── porthopper │ │ ├── Jamfile.v2 │ │ ├── client.cpp │ │ ├── protocol.hpp │ │ └── server.cpp │ ├── serialization │ │ ├── Jamfile.v2 │ │ ├── client.cpp │ │ ├── connection.hpp │ │ ├── server.cpp │ │ └── stock.hpp │ ├── services │ │ ├── Jamfile.v2 │ │ ├── basic_logger.hpp │ │ ├── daytime_client.cpp │ │ ├── logger.hpp │ │ ├── logger_service.cpp │ │ └── logger_service.hpp │ ├── socks4 │ │ ├── Jamfile.v2 │ │ ├── socks4.hpp │ │ └── sync_client.cpp │ ├── spawn │ │ ├── Jamfile.v2 │ │ ├── echo_server.cpp │ │ └── parallel_grep.cpp │ ├── ssl │ │ ├── Jamfile.v2 │ │ ├── README │ │ ├── ca.pem │ │ ├── client.cpp │ │ ├── dh4096.pem │ │ ├── server.cpp │ │ └── server.pem │ ├── timeouts │ │ ├── Jamfile.v2 │ │ ├── async_tcp_client.cpp │ │ ├── blocking_tcp_client.cpp │ │ ├── blocking_token_tcp_client.cpp │ │ ├── blocking_udp_client.cpp │ │ └── server.cpp │ ├── timers │ │ ├── Jamfile.v2 │ │ └── time_t_timer.cpp │ ├── tutorial │ │ ├── Jamfile.v2 │ │ ├── daytime1 │ │ │ └── client.cpp │ │ ├── daytime2 │ │ │ └── server.cpp │ │ ├── daytime3 │ │ │ └── server.cpp │ │ ├── daytime4 │ │ │ └── client.cpp │ │ ├── daytime5 │ │ │ └── server.cpp │ │ ├── daytime6 │ │ │ └── server.cpp │ │ ├── daytime7 │ │ │ └── server.cpp │ │ ├── daytime_dox.txt │ │ ├── index_dox.txt │ │ ├── timer1 │ │ │ └── timer.cpp │ │ ├── timer2 │ │ │ └── timer.cpp │ │ ├── timer3 │ │ │ └── timer.cpp │ │ ├── timer4 │ │ │ └── timer.cpp │ │ ├── timer5 │ │ │ └── timer.cpp │ │ └── timer_dox.txt │ ├── type_erasure │ │ ├── Jamfile.v2 │ │ ├── line_reader.hpp │ │ ├── main.cpp │ │ ├── sleep.cpp │ │ ├── sleep.hpp │ │ ├── stdin_line_reader.cpp │ │ └── stdin_line_reader.hpp │ └── windows │ │ ├── Jamfile.v2 │ │ └── transmit_file.cpp ├── cpp14 │ ├── build.jam │ ├── deferred │ │ ├── Jamfile.v2 │ │ ├── deferred_1.cpp │ │ ├── deferred_2.cpp │ │ ├── deferred_3.cpp │ │ ├── deferred_4.cpp │ │ ├── deferred_5.cpp │ │ ├── deferred_6.cpp │ │ └── deferred_7.cpp │ ├── echo │ │ ├── Jamfile.v2 │ │ ├── async_tcp_echo_server.cpp │ │ ├── async_udp_echo_server.cpp │ │ ├── blocking_tcp_echo_client.cpp │ │ ├── blocking_tcp_echo_server.cpp │ │ ├── blocking_udp_echo_client.cpp │ │ └── blocking_udp_echo_server.cpp │ ├── executors │ │ ├── Jamfile.v2 │ │ ├── actor.cpp │ │ ├── async_1.cpp │ │ ├── async_2.cpp │ │ ├── bank_account_1.cpp │ │ ├── bank_account_2.cpp │ │ ├── fork_join.cpp │ │ ├── pipeline.cpp │ │ └── priority_scheduler.cpp │ ├── iostreams │ │ ├── Jamfile.v2 │ │ └── http_client.cpp │ ├── operations │ │ ├── Jamfile.v2 │ │ ├── c_callback_wrapper.cpp │ │ ├── callback_wrapper.cpp │ │ ├── composed_1.cpp │ │ ├── composed_2.cpp │ │ ├── composed_3.cpp │ │ ├── composed_4.cpp │ │ ├── composed_5.cpp │ │ ├── composed_6.cpp │ │ ├── composed_7.cpp │ │ └── composed_8.cpp │ └── parallel_group │ │ ├── Jamfile.v2 │ │ ├── parallel_sort.cpp │ │ ├── ranged_wait_for_all.cpp │ │ ├── wait_for_all.cpp │ │ ├── wait_for_one.cpp │ │ ├── wait_for_one_error.cpp │ │ └── wait_for_one_success.cpp ├── cpp17 │ ├── build.jam │ └── coroutines_ts │ │ ├── chat_server.cpp │ │ ├── echo_server.cpp │ │ ├── echo_server_with_as_single_default.cpp │ │ ├── echo_server_with_as_tuple_default.cpp │ │ ├── echo_server_with_default.cpp │ │ ├── range_based_for.cpp │ │ └── refactored_echo_server.cpp └── cpp20 │ ├── build.jam │ ├── channels │ ├── Jamfile.v2 │ ├── mutual_exclusion_1.cpp │ ├── mutual_exclusion_2.cpp │ └── throttling_proxy.cpp │ ├── coroutines │ ├── Jamfile.v2 │ ├── chat_server.cpp │ ├── echo_server.cpp │ ├── echo_server_with_as_single_default.cpp │ ├── echo_server_with_as_tuple_default.cpp │ ├── echo_server_with_default.cpp │ ├── echo_server_with_deferred.cpp │ ├── echo_server_with_deferred_default.cpp │ ├── refactored_echo_server.cpp │ └── timeout.cpp │ ├── invocation │ ├── Jamfile.v2 │ └── completion_executor.cpp │ ├── operations │ ├── Jamfile.v2 │ ├── c_callback_wrapper.cpp │ ├── callback_wrapper.cpp │ ├── composed_1.cpp │ ├── composed_2.cpp │ ├── composed_3.cpp │ ├── composed_4.cpp │ ├── composed_5.cpp │ ├── composed_6.cpp │ ├── composed_7.cpp │ └── composed_8.cpp │ └── type_erasure │ ├── Jamfile.v2 │ ├── line_reader.hpp │ ├── main.cpp │ ├── sleep.cpp │ ├── sleep.hpp │ ├── stdin_line_reader.cpp │ └── stdin_line_reader.hpp ├── include └── boost │ ├── asio.hpp │ └── asio │ ├── any_completion_executor.hpp │ ├── any_completion_handler.hpp │ ├── any_io_executor.hpp │ ├── append.hpp │ ├── as_tuple.hpp │ ├── associated_allocator.hpp │ ├── associated_cancellation_slot.hpp │ ├── associated_executor.hpp │ ├── associated_immediate_executor.hpp │ ├── associator.hpp │ ├── async_result.hpp │ ├── awaitable.hpp │ ├── basic_datagram_socket.hpp │ ├── basic_deadline_timer.hpp │ ├── basic_file.hpp │ ├── basic_io_object.hpp │ ├── basic_random_access_file.hpp │ ├── basic_raw_socket.hpp │ ├── basic_readable_pipe.hpp │ ├── basic_seq_packet_socket.hpp │ ├── basic_serial_port.hpp │ ├── basic_signal_set.hpp │ ├── basic_socket.hpp │ ├── basic_socket_acceptor.hpp │ ├── basic_socket_iostream.hpp │ ├── basic_socket_streambuf.hpp │ ├── basic_stream_file.hpp │ ├── basic_stream_socket.hpp │ ├── basic_streambuf.hpp │ ├── basic_streambuf_fwd.hpp │ ├── basic_waitable_timer.hpp │ ├── basic_writable_pipe.hpp │ ├── bind_allocator.hpp │ ├── bind_cancellation_slot.hpp │ ├── bind_executor.hpp │ ├── bind_immediate_executor.hpp │ ├── buffer.hpp │ ├── buffer_registration.hpp │ ├── buffered_read_stream.hpp │ ├── buffered_read_stream_fwd.hpp │ ├── buffered_stream.hpp │ ├── buffered_stream_fwd.hpp │ ├── buffered_write_stream.hpp │ ├── buffered_write_stream_fwd.hpp │ ├── buffers_iterator.hpp │ ├── cancel_after.hpp │ ├── cancel_at.hpp │ ├── cancellation_signal.hpp │ ├── cancellation_state.hpp │ ├── cancellation_type.hpp │ ├── co_composed.hpp │ ├── co_spawn.hpp │ ├── completion_condition.hpp │ ├── compose.hpp │ ├── composed.hpp │ ├── config.hpp │ ├── connect.hpp │ ├── connect_pipe.hpp │ ├── consign.hpp │ ├── coroutine.hpp │ ├── deadline_timer.hpp │ ├── default_completion_token.hpp │ ├── defer.hpp │ ├── deferred.hpp │ ├── detached.hpp │ ├── detail │ ├── array.hpp │ ├── array_fwd.hpp │ ├── assert.hpp │ ├── atomic_count.hpp │ ├── base_from_cancellation_state.hpp │ ├── base_from_completion_cond.hpp │ ├── bind_handler.hpp │ ├── blocking_executor_op.hpp │ ├── buffer_resize_guard.hpp │ ├── buffer_sequence_adapter.hpp │ ├── buffered_stream_storage.hpp │ ├── call_stack.hpp │ ├── chrono.hpp │ ├── chrono_time_traits.hpp │ ├── completion_handler.hpp │ ├── completion_message.hpp │ ├── completion_payload.hpp │ ├── completion_payload_handler.hpp │ ├── composed_work.hpp │ ├── concurrency_hint.hpp │ ├── conditionally_enabled_event.hpp │ ├── conditionally_enabled_mutex.hpp │ ├── config.hpp │ ├── consuming_buffers.hpp │ ├── cstddef.hpp │ ├── cstdint.hpp │ ├── date_time_fwd.hpp │ ├── deadline_timer_service.hpp │ ├── dependent_type.hpp │ ├── descriptor_ops.hpp │ ├── descriptor_read_op.hpp │ ├── descriptor_write_op.hpp │ ├── dev_poll_reactor.hpp │ ├── epoll_reactor.hpp │ ├── event.hpp │ ├── eventfd_select_interrupter.hpp │ ├── exception.hpp │ ├── executor_function.hpp │ ├── executor_op.hpp │ ├── fd_set_adapter.hpp │ ├── fenced_block.hpp │ ├── functional.hpp │ ├── future.hpp │ ├── global.hpp │ ├── handler_alloc_helpers.hpp │ ├── handler_cont_helpers.hpp │ ├── handler_tracking.hpp │ ├── handler_type_requirements.hpp │ ├── handler_work.hpp │ ├── hash_map.hpp │ ├── impl │ │ ├── buffer_sequence_adapter.ipp │ │ ├── descriptor_ops.ipp │ │ ├── dev_poll_reactor.hpp │ │ ├── dev_poll_reactor.ipp │ │ ├── epoll_reactor.hpp │ │ ├── epoll_reactor.ipp │ │ ├── eventfd_select_interrupter.ipp │ │ ├── handler_tracking.ipp │ │ ├── io_uring_descriptor_service.ipp │ │ ├── io_uring_file_service.ipp │ │ ├── io_uring_service.hpp │ │ ├── io_uring_service.ipp │ │ ├── io_uring_socket_service_base.ipp │ │ ├── kqueue_reactor.hpp │ │ ├── kqueue_reactor.ipp │ │ ├── null_event.ipp │ │ ├── pipe_select_interrupter.ipp │ │ ├── posix_event.ipp │ │ ├── posix_mutex.ipp │ │ ├── posix_serial_port_service.ipp │ │ ├── posix_thread.ipp │ │ ├── posix_tss_ptr.ipp │ │ ├── reactive_descriptor_service.ipp │ │ ├── reactive_socket_service_base.ipp │ │ ├── resolver_service_base.ipp │ │ ├── scheduler.ipp │ │ ├── select_reactor.hpp │ │ ├── select_reactor.ipp │ │ ├── service_registry.hpp │ │ ├── service_registry.ipp │ │ ├── signal_set_service.ipp │ │ ├── socket_ops.ipp │ │ ├── socket_select_interrupter.ipp │ │ ├── strand_executor_service.hpp │ │ ├── strand_executor_service.ipp │ │ ├── strand_service.hpp │ │ ├── strand_service.ipp │ │ ├── thread_context.ipp │ │ ├── throw_error.ipp │ │ ├── timer_queue_ptime.ipp │ │ ├── timer_queue_set.ipp │ │ ├── win_event.ipp │ │ ├── win_iocp_file_service.ipp │ │ ├── win_iocp_handle_service.ipp │ │ ├── win_iocp_io_context.hpp │ │ ├── win_iocp_io_context.ipp │ │ ├── win_iocp_serial_port_service.ipp │ │ ├── win_iocp_socket_service_base.ipp │ │ ├── win_mutex.ipp │ │ ├── win_object_handle_service.ipp │ │ ├── win_static_mutex.ipp │ │ ├── win_thread.ipp │ │ ├── win_tss_ptr.ipp │ │ ├── winrt_ssocket_service_base.ipp │ │ ├── winrt_timer_scheduler.hpp │ │ ├── winrt_timer_scheduler.ipp │ │ └── winsock_init.ipp │ ├── initiate_defer.hpp │ ├── initiate_dispatch.hpp │ ├── initiate_post.hpp │ ├── initiation_base.hpp │ ├── io_control.hpp │ ├── io_object_impl.hpp │ ├── io_uring_descriptor_read_at_op.hpp │ ├── io_uring_descriptor_read_op.hpp │ ├── io_uring_descriptor_service.hpp │ ├── io_uring_descriptor_write_at_op.hpp │ ├── io_uring_descriptor_write_op.hpp │ ├── io_uring_file_service.hpp │ ├── io_uring_null_buffers_op.hpp │ ├── io_uring_operation.hpp │ ├── io_uring_service.hpp │ ├── io_uring_socket_accept_op.hpp │ ├── io_uring_socket_connect_op.hpp │ ├── io_uring_socket_recv_op.hpp │ ├── io_uring_socket_recvfrom_op.hpp │ ├── io_uring_socket_recvmsg_op.hpp │ ├── io_uring_socket_send_op.hpp │ ├── io_uring_socket_sendto_op.hpp │ ├── io_uring_socket_service.hpp │ ├── io_uring_socket_service_base.hpp │ ├── io_uring_wait_op.hpp │ ├── is_buffer_sequence.hpp │ ├── is_executor.hpp │ ├── keyword_tss_ptr.hpp │ ├── kqueue_reactor.hpp │ ├── limits.hpp │ ├── local_free_on_block_exit.hpp │ ├── memory.hpp │ ├── mutex.hpp │ ├── non_const_lvalue.hpp │ ├── noncopyable.hpp │ ├── null_event.hpp │ ├── null_fenced_block.hpp │ ├── null_global.hpp │ ├── null_mutex.hpp │ ├── null_reactor.hpp │ ├── null_signal_blocker.hpp │ ├── null_socket_service.hpp │ ├── null_static_mutex.hpp │ ├── null_thread.hpp │ ├── null_tss_ptr.hpp │ ├── object_pool.hpp │ ├── old_win_sdk_compat.hpp │ ├── op_queue.hpp │ ├── operation.hpp │ ├── pipe_select_interrupter.hpp │ ├── pop_options.hpp │ ├── posix_event.hpp │ ├── posix_fd_set_adapter.hpp │ ├── posix_global.hpp │ ├── posix_mutex.hpp │ ├── posix_serial_port_service.hpp │ ├── posix_signal_blocker.hpp │ ├── posix_static_mutex.hpp │ ├── posix_thread.hpp │ ├── posix_tss_ptr.hpp │ ├── push_options.hpp │ ├── reactive_descriptor_service.hpp │ ├── reactive_null_buffers_op.hpp │ ├── reactive_socket_accept_op.hpp │ ├── reactive_socket_connect_op.hpp │ ├── reactive_socket_recv_op.hpp │ ├── reactive_socket_recvfrom_op.hpp │ ├── reactive_socket_recvmsg_op.hpp │ ├── reactive_socket_send_op.hpp │ ├── reactive_socket_sendto_op.hpp │ ├── reactive_socket_service.hpp │ ├── reactive_socket_service_base.hpp │ ├── reactive_wait_op.hpp │ ├── reactor.hpp │ ├── reactor_op.hpp │ ├── reactor_op_queue.hpp │ ├── recycling_allocator.hpp │ ├── regex_fwd.hpp │ ├── resolve_endpoint_op.hpp │ ├── resolve_op.hpp │ ├── resolve_query_op.hpp │ ├── resolver_service.hpp │ ├── resolver_service_base.hpp │ ├── scheduler.hpp │ ├── scheduler_operation.hpp │ ├── scheduler_task.hpp │ ├── scheduler_thread_info.hpp │ ├── scoped_lock.hpp │ ├── scoped_ptr.hpp │ ├── select_interrupter.hpp │ ├── select_reactor.hpp │ ├── service_registry.hpp │ ├── signal_blocker.hpp │ ├── signal_handler.hpp │ ├── signal_init.hpp │ ├── signal_op.hpp │ ├── signal_set_service.hpp │ ├── socket_holder.hpp │ ├── socket_ops.hpp │ ├── socket_option.hpp │ ├── socket_select_interrupter.hpp │ ├── socket_types.hpp │ ├── source_location.hpp │ ├── static_mutex.hpp │ ├── std_event.hpp │ ├── std_fenced_block.hpp │ ├── std_global.hpp │ ├── std_mutex.hpp │ ├── std_static_mutex.hpp │ ├── std_thread.hpp │ ├── strand_executor_service.hpp │ ├── strand_service.hpp │ ├── string_view.hpp │ ├── thread.hpp │ ├── thread_context.hpp │ ├── thread_group.hpp │ ├── thread_info_base.hpp │ ├── throw_error.hpp │ ├── throw_exception.hpp │ ├── timed_cancel_op.hpp │ ├── timer_queue.hpp │ ├── timer_queue_base.hpp │ ├── timer_queue_ptime.hpp │ ├── timer_queue_set.hpp │ ├── timer_scheduler.hpp │ ├── timer_scheduler_fwd.hpp │ ├── tss_ptr.hpp │ ├── type_traits.hpp │ ├── utility.hpp │ ├── wait_handler.hpp │ ├── wait_op.hpp │ ├── win_event.hpp │ ├── win_fd_set_adapter.hpp │ ├── win_global.hpp │ ├── win_iocp_file_service.hpp │ ├── win_iocp_handle_read_op.hpp │ ├── win_iocp_handle_service.hpp │ ├── win_iocp_handle_write_op.hpp │ ├── win_iocp_io_context.hpp │ ├── win_iocp_null_buffers_op.hpp │ ├── win_iocp_operation.hpp │ ├── win_iocp_overlapped_op.hpp │ ├── win_iocp_overlapped_ptr.hpp │ ├── win_iocp_serial_port_service.hpp │ ├── win_iocp_socket_accept_op.hpp │ ├── win_iocp_socket_connect_op.hpp │ ├── win_iocp_socket_recv_op.hpp │ ├── win_iocp_socket_recvfrom_op.hpp │ ├── win_iocp_socket_recvmsg_op.hpp │ ├── win_iocp_socket_send_op.hpp │ ├── win_iocp_socket_service.hpp │ ├── win_iocp_socket_service_base.hpp │ ├── win_iocp_thread_info.hpp │ ├── win_iocp_wait_op.hpp │ ├── win_mutex.hpp │ ├── win_object_handle_service.hpp │ ├── win_static_mutex.hpp │ ├── win_thread.hpp │ ├── win_tss_ptr.hpp │ ├── winapp_thread.hpp │ ├── wince_thread.hpp │ ├── winrt_async_manager.hpp │ ├── winrt_async_op.hpp │ ├── winrt_resolve_op.hpp │ ├── winrt_resolver_service.hpp │ ├── winrt_socket_connect_op.hpp │ ├── winrt_socket_recv_op.hpp │ ├── winrt_socket_send_op.hpp │ ├── winrt_ssocket_service.hpp │ ├── winrt_ssocket_service_base.hpp │ ├── winrt_timer_scheduler.hpp │ ├── winrt_utils.hpp │ ├── winsock_init.hpp │ ├── work_dispatcher.hpp │ └── wrapped_handler.hpp │ ├── dispatch.hpp │ ├── disposition.hpp │ ├── error.hpp │ ├── execution.hpp │ ├── execution │ ├── allocator.hpp │ ├── any_executor.hpp │ ├── bad_executor.hpp │ ├── blocking.hpp │ ├── blocking_adaptation.hpp │ ├── context.hpp │ ├── context_as.hpp │ ├── executor.hpp │ ├── impl │ │ └── bad_executor.ipp │ ├── invocable_archetype.hpp │ ├── mapping.hpp │ ├── occupancy.hpp │ ├── outstanding_work.hpp │ ├── prefer_only.hpp │ └── relationship.hpp │ ├── execution_context.hpp │ ├── executor.hpp │ ├── executor_work_guard.hpp │ ├── experimental │ ├── as_single.hpp │ ├── awaitable_operators.hpp │ ├── basic_channel.hpp │ ├── basic_concurrent_channel.hpp │ ├── cancellation_condition.hpp │ ├── channel.hpp │ ├── channel_error.hpp │ ├── channel_traits.hpp │ ├── co_composed.hpp │ ├── co_spawn.hpp │ ├── concurrent_channel.hpp │ ├── coro.hpp │ ├── coro_traits.hpp │ ├── detail │ │ ├── channel_operation.hpp │ │ ├── channel_receive_op.hpp │ │ ├── channel_send_functions.hpp │ │ ├── channel_send_op.hpp │ │ ├── channel_service.hpp │ │ ├── coro_completion_handler.hpp │ │ ├── coro_promise_allocator.hpp │ │ ├── has_signature.hpp │ │ ├── impl │ │ │ └── channel_service.hpp │ │ └── partial_promise.hpp │ ├── impl │ │ ├── as_single.hpp │ │ ├── channel_error.ipp │ │ ├── coro.hpp │ │ ├── parallel_group.hpp │ │ ├── promise.hpp │ │ ├── use_coro.hpp │ │ └── use_promise.hpp │ ├── parallel_group.hpp │ ├── promise.hpp │ ├── use_coro.hpp │ └── use_promise.hpp │ ├── file_base.hpp │ ├── generic │ ├── basic_endpoint.hpp │ ├── datagram_protocol.hpp │ ├── detail │ │ ├── endpoint.hpp │ │ └── impl │ │ │ └── endpoint.ipp │ ├── raw_protocol.hpp │ ├── seq_packet_protocol.hpp │ └── stream_protocol.hpp │ ├── handler_continuation_hook.hpp │ ├── high_resolution_timer.hpp │ ├── immediate.hpp │ ├── impl │ ├── any_completion_executor.ipp │ ├── any_io_executor.ipp │ ├── append.hpp │ ├── as_tuple.hpp │ ├── awaitable.hpp │ ├── buffered_read_stream.hpp │ ├── buffered_write_stream.hpp │ ├── cancel_after.hpp │ ├── cancel_at.hpp │ ├── cancellation_signal.ipp │ ├── co_spawn.hpp │ ├── config.hpp │ ├── config.ipp │ ├── connect.hpp │ ├── connect_pipe.hpp │ ├── connect_pipe.ipp │ ├── consign.hpp │ ├── deferred.hpp │ ├── detached.hpp │ ├── error.ipp │ ├── execution_context.hpp │ ├── execution_context.ipp │ ├── executor.hpp │ ├── executor.ipp │ ├── io_context.hpp │ ├── io_context.ipp │ ├── multiple_exceptions.ipp │ ├── prepend.hpp │ ├── read.hpp │ ├── read_at.hpp │ ├── read_until.hpp │ ├── redirect_error.hpp │ ├── serial_port_base.hpp │ ├── serial_port_base.ipp │ ├── spawn.hpp │ ├── src.hpp │ ├── system_context.hpp │ ├── system_context.ipp │ ├── system_executor.hpp │ ├── thread_pool.hpp │ ├── thread_pool.ipp │ ├── use_awaitable.hpp │ ├── use_future.hpp │ ├── write.hpp │ └── write_at.hpp │ ├── io_context.hpp │ ├── io_context_strand.hpp │ ├── ip │ ├── address.hpp │ ├── address_v4.hpp │ ├── address_v4_iterator.hpp │ ├── address_v4_range.hpp │ ├── address_v6.hpp │ ├── address_v6_iterator.hpp │ ├── address_v6_range.hpp │ ├── bad_address_cast.hpp │ ├── basic_endpoint.hpp │ ├── basic_resolver.hpp │ ├── basic_resolver_entry.hpp │ ├── basic_resolver_iterator.hpp │ ├── basic_resolver_query.hpp │ ├── basic_resolver_results.hpp │ ├── detail │ │ ├── endpoint.hpp │ │ ├── impl │ │ │ └── endpoint.ipp │ │ └── socket_option.hpp │ ├── host_name.hpp │ ├── icmp.hpp │ ├── impl │ │ ├── address.hpp │ │ ├── address.ipp │ │ ├── address_v4.hpp │ │ ├── address_v4.ipp │ │ ├── address_v6.hpp │ │ ├── address_v6.ipp │ │ ├── basic_endpoint.hpp │ │ ├── host_name.ipp │ │ ├── network_v4.hpp │ │ ├── network_v4.ipp │ │ ├── network_v6.hpp │ │ └── network_v6.ipp │ ├── multicast.hpp │ ├── network_v4.hpp │ ├── network_v6.hpp │ ├── resolver_base.hpp │ ├── resolver_query_base.hpp │ ├── tcp.hpp │ ├── udp.hpp │ ├── unicast.hpp │ └── v6_only.hpp │ ├── is_applicable_property.hpp │ ├── is_contiguous_iterator.hpp │ ├── is_executor.hpp │ ├── is_read_buffered.hpp │ ├── is_write_buffered.hpp │ ├── local │ ├── basic_endpoint.hpp │ ├── connect_pair.hpp │ ├── datagram_protocol.hpp │ ├── detail │ │ ├── endpoint.hpp │ │ └── impl │ │ │ └── endpoint.ipp │ ├── seq_packet_protocol.hpp │ └── stream_protocol.hpp │ ├── multiple_exceptions.hpp │ ├── packaged_task.hpp │ ├── placeholders.hpp │ ├── posix │ ├── basic_descriptor.hpp │ ├── basic_stream_descriptor.hpp │ ├── descriptor.hpp │ ├── descriptor_base.hpp │ └── stream_descriptor.hpp │ ├── post.hpp │ ├── prefer.hpp │ ├── prepend.hpp │ ├── query.hpp │ ├── random_access_file.hpp │ ├── read.hpp │ ├── read_at.hpp │ ├── read_until.hpp │ ├── readable_pipe.hpp │ ├── recycling_allocator.hpp │ ├── redirect_error.hpp │ ├── registered_buffer.hpp │ ├── require.hpp │ ├── require_concept.hpp │ ├── serial_port.hpp │ ├── serial_port_base.hpp │ ├── signal_set.hpp │ ├── signal_set_base.hpp │ ├── socket_base.hpp │ ├── spawn.hpp │ ├── ssl.hpp │ ├── ssl │ ├── context.hpp │ ├── context_base.hpp │ ├── detail │ │ ├── buffered_handshake_op.hpp │ │ ├── engine.hpp │ │ ├── handshake_op.hpp │ │ ├── impl │ │ │ ├── engine.ipp │ │ │ └── openssl_init.ipp │ │ ├── io.hpp │ │ ├── openssl_init.hpp │ │ ├── openssl_types.hpp │ │ ├── password_callback.hpp │ │ ├── read_op.hpp │ │ ├── shutdown_op.hpp │ │ ├── stream_core.hpp │ │ ├── verify_callback.hpp │ │ └── write_op.hpp │ ├── error.hpp │ ├── host_name_verification.hpp │ ├── impl │ │ ├── context.hpp │ │ ├── context.ipp │ │ ├── error.ipp │ │ ├── host_name_verification.ipp │ │ └── src.hpp │ ├── stream.hpp │ ├── stream_base.hpp │ ├── verify_context.hpp │ └── verify_mode.hpp │ ├── static_thread_pool.hpp │ ├── steady_timer.hpp │ ├── strand.hpp │ ├── stream_file.hpp │ ├── streambuf.hpp │ ├── system_context.hpp │ ├── system_executor.hpp │ ├── system_timer.hpp │ ├── this_coro.hpp │ ├── thread_pool.hpp │ ├── time_traits.hpp │ ├── traits │ ├── equality_comparable.hpp │ ├── execute_member.hpp │ ├── prefer_free.hpp │ ├── prefer_member.hpp │ ├── query_free.hpp │ ├── query_member.hpp │ ├── query_static_constexpr_member.hpp │ ├── require_concept_free.hpp │ ├── require_concept_member.hpp │ ├── require_free.hpp │ ├── require_member.hpp │ ├── static_query.hpp │ ├── static_require.hpp │ └── static_require_concept.hpp │ ├── ts │ ├── buffer.hpp │ ├── executor.hpp │ ├── internet.hpp │ ├── io_context.hpp │ ├── net.hpp │ ├── netfwd.hpp │ ├── socket.hpp │ └── timer.hpp │ ├── unyield.hpp │ ├── use_awaitable.hpp │ ├── use_future.hpp │ ├── uses_executor.hpp │ ├── version.hpp │ ├── wait_traits.hpp │ ├── windows │ ├── basic_object_handle.hpp │ ├── basic_overlapped_handle.hpp │ ├── basic_random_access_handle.hpp │ ├── basic_stream_handle.hpp │ ├── object_handle.hpp │ ├── overlapped_handle.hpp │ ├── overlapped_ptr.hpp │ ├── random_access_handle.hpp │ └── stream_handle.hpp │ ├── writable_pipe.hpp │ ├── write.hpp │ ├── write_at.hpp │ └── yield.hpp ├── index.html ├── meta └── libraries.json ├── test ├── Jamfile.v2 ├── any_completion_executor.cpp ├── any_completion_handler.cpp ├── any_io_executor.cpp ├── append.cpp ├── archetypes │ ├── async_ops.hpp │ ├── async_result.hpp │ ├── gettable_socket_option.hpp │ ├── io_control_command.hpp │ └── settable_socket_option.hpp ├── as_tuple.cpp ├── associated_allocator.cpp ├── associated_cancellation_slot.cpp ├── associated_executor.cpp ├── associated_immediate_executor.cpp ├── associator.cpp ├── async_result.cpp ├── awaitable.cpp ├── basic_datagram_socket.cpp ├── basic_deadline_timer.cpp ├── basic_file.cpp ├── basic_random_access_file.cpp ├── basic_raw_socket.cpp ├── basic_readable_pipe.cpp ├── basic_seq_packet_socket.cpp ├── basic_serial_port.cpp ├── basic_signal_set.cpp ├── basic_socket.cpp ├── basic_socket_acceptor.cpp ├── basic_stream_file.cpp ├── basic_stream_socket.cpp ├── basic_streambuf.cpp ├── basic_waitable_timer.cpp ├── basic_writable_pipe.cpp ├── bind_allocator.cpp ├── bind_cancellation_slot.cpp ├── bind_executor.cpp ├── bind_immediate_executor.cpp ├── buffer.cpp ├── buffer_registration.cpp ├── buffered_read_stream.cpp ├── buffered_stream.cpp ├── buffered_write_stream.cpp ├── buffers_iterator.cpp ├── cancel_after.cpp ├── cancel_at.cpp ├── cancellation_signal.cpp ├── cancellation_state.cpp ├── cancellation_type.cpp ├── co_composed.cpp ├── co_spawn.cpp ├── completion_condition.cpp ├── compose.cpp ├── composed.cpp ├── config.cpp ├── connect.cpp ├── connect_pipe.cpp ├── consign.cpp ├── coroutine.cpp ├── deadline_timer.cpp ├── defer.cpp ├── deferred.cpp ├── detached.cpp ├── dispatch.cpp ├── disposition.cpp ├── error.cpp ├── execution │ ├── Jamfile.v2 │ ├── any_executor.cpp │ ├── blocking.cpp │ ├── blocking_adaptation.cpp │ ├── context_as.cpp │ ├── executor.cpp │ ├── invocable_archetype.cpp │ ├── mapping.cpp │ ├── outstanding_work.cpp │ ├── prefer_only.cpp │ └── relationship.cpp ├── execution_context.cpp ├── executor.cpp ├── executor_work_guard.cpp ├── experimental │ ├── Jamfile.v2 │ ├── awaitable_operators.cpp │ ├── basic_channel.cpp │ ├── basic_concurrent_channel.cpp │ ├── channel.cpp │ ├── channel_traits.cpp │ ├── co_composed.cpp │ ├── concurrent_channel.cpp │ ├── coro │ │ ├── Jamfile.v2 │ │ ├── allocator.cpp │ │ ├── cancel.cpp │ │ ├── co_spawn.cpp │ │ ├── exception.cpp │ │ ├── executor.cpp │ │ ├── partial.cpp │ │ ├── simple_test.cpp │ │ ├── stack_test.cpp │ │ └── use_coro.cpp │ ├── parallel_group.cpp │ └── promise.cpp ├── file_base.cpp ├── generic │ ├── basic_endpoint.cpp │ ├── datagram_protocol.cpp │ ├── raw_protocol.cpp │ ├── seq_packet_protocol.cpp │ └── stream_protocol.cpp ├── high_resolution_timer.cpp ├── immediate.cpp ├── io_context.cpp ├── io_context_strand.cpp ├── ip │ ├── address.cpp │ ├── address_v4.cpp │ ├── address_v4_iterator.cpp │ ├── address_v4_range.cpp │ ├── address_v6.cpp │ ├── address_v6_iterator.cpp │ ├── address_v6_range.cpp │ ├── basic_endpoint.cpp │ ├── basic_resolver.cpp │ ├── basic_resolver_entry.cpp │ ├── basic_resolver_iterator.cpp │ ├── basic_resolver_query.cpp │ ├── host_name.cpp │ ├── icmp.cpp │ ├── multicast.cpp │ ├── network_v4.cpp │ ├── network_v6.cpp │ ├── resolver_query_base.cpp │ ├── tcp.cpp │ ├── udp.cpp │ ├── unicast.cpp │ └── v6_only.cpp ├── is_read_buffered.cpp ├── is_write_buffered.cpp ├── latency │ ├── Jamfile.v2 │ ├── allocator.hpp │ ├── high_res_clock.hpp │ ├── tcp_client.cpp │ ├── tcp_server.cpp │ ├── udp_client.cpp │ └── udp_server.cpp ├── local │ ├── basic_endpoint.cpp │ ├── connect_pair.cpp │ ├── datagram_protocol.cpp │ ├── seq_packet_protocol.cpp │ └── stream_protocol.cpp ├── packaged_task.cpp ├── placeholders.cpp ├── posix │ ├── basic_descriptor.cpp │ ├── basic_stream_descriptor.cpp │ ├── descriptor.cpp │ ├── descriptor_base.cpp │ └── stream_descriptor.cpp ├── post.cpp ├── prepend.cpp ├── properties │ ├── cpp03 │ │ ├── Jamfile.v2 │ │ ├── can_prefer_free_prefer.cpp │ │ ├── can_prefer_free_require.cpp │ │ ├── can_prefer_member_prefer.cpp │ │ ├── can_prefer_member_require.cpp │ │ ├── can_prefer_not_applicable_free_prefer.cpp │ │ ├── can_prefer_not_applicable_free_require.cpp │ │ ├── can_prefer_not_applicable_member_prefer.cpp │ │ ├── can_prefer_not_applicable_member_require.cpp │ │ ├── can_prefer_not_applicable_static.cpp │ │ ├── can_prefer_not_applicable_unsupported.cpp │ │ ├── can_prefer_not_preferable_free_prefer.cpp │ │ ├── can_prefer_not_preferable_free_require.cpp │ │ ├── can_prefer_not_preferable_member_prefer.cpp │ │ ├── can_prefer_not_preferable_member_require.cpp │ │ ├── can_prefer_not_preferable_static.cpp │ │ ├── can_prefer_not_preferable_unsupported.cpp │ │ ├── can_prefer_static.cpp │ │ ├── can_prefer_unsupported.cpp │ │ ├── can_query_free.cpp │ │ ├── can_query_member.cpp │ │ ├── can_query_not_applicable_free.cpp │ │ ├── can_query_not_applicable_member.cpp │ │ ├── can_query_not_applicable_static.cpp │ │ ├── can_query_not_applicable_unsupported.cpp │ │ ├── can_query_static.cpp │ │ ├── can_query_unsupported.cpp │ │ ├── can_require_concept_free.cpp │ │ ├── can_require_concept_member.cpp │ │ ├── can_require_concept_not_applicable_free.cpp │ │ ├── can_require_concept_not_applicable_member.cpp │ │ ├── can_require_concept_not_applicable_static.cpp │ │ ├── can_require_concept_not_applicable_unsupported.cpp │ │ ├── can_require_concept_static.cpp │ │ ├── can_require_concept_unsupported.cpp │ │ ├── can_require_free.cpp │ │ ├── can_require_member.cpp │ │ ├── can_require_not_applicable_free.cpp │ │ ├── can_require_not_applicable_member.cpp │ │ ├── can_require_not_applicable_static.cpp │ │ ├── can_require_not_applicable_unsupported.cpp │ │ ├── can_require_static.cpp │ │ ├── can_require_unsupported.cpp │ │ ├── prefer_free_prefer.cpp │ │ ├── prefer_free_require.cpp │ │ ├── prefer_member_prefer.cpp │ │ ├── prefer_member_require.cpp │ │ ├── prefer_static.cpp │ │ ├── prefer_unsupported.cpp │ │ ├── query_free.cpp │ │ ├── query_member.cpp │ │ ├── query_static.cpp │ │ ├── require_concept_free.cpp │ │ ├── require_concept_member.cpp │ │ ├── require_concept_static.cpp │ │ ├── require_free.cpp │ │ ├── require_member.cpp │ │ └── require_static.cpp │ ├── cpp11 │ │ ├── Jamfile.v2 │ │ ├── can_prefer_free_prefer.cpp │ │ ├── can_prefer_free_require.cpp │ │ ├── can_prefer_member_prefer.cpp │ │ ├── can_prefer_member_require.cpp │ │ ├── can_prefer_not_applicable_free_prefer.cpp │ │ ├── can_prefer_not_applicable_free_require.cpp │ │ ├── can_prefer_not_applicable_member_prefer.cpp │ │ ├── can_prefer_not_applicable_member_require.cpp │ │ ├── can_prefer_not_applicable_static.cpp │ │ ├── can_prefer_not_applicable_unsupported.cpp │ │ ├── can_prefer_not_preferable_free_prefer.cpp │ │ ├── can_prefer_not_preferable_free_require.cpp │ │ ├── can_prefer_not_preferable_member_prefer.cpp │ │ ├── can_prefer_not_preferable_member_require.cpp │ │ ├── can_prefer_not_preferable_static.cpp │ │ ├── can_prefer_not_preferable_unsupported.cpp │ │ ├── can_prefer_static.cpp │ │ ├── can_prefer_unsupported.cpp │ │ ├── can_query_free.cpp │ │ ├── can_query_member.cpp │ │ ├── can_query_not_applicable_free.cpp │ │ ├── can_query_not_applicable_member.cpp │ │ ├── can_query_not_applicable_static.cpp │ │ ├── can_query_not_applicable_unsupported.cpp │ │ ├── can_query_static.cpp │ │ ├── can_query_unsupported.cpp │ │ ├── can_require_concept_free.cpp │ │ ├── can_require_concept_member.cpp │ │ ├── can_require_concept_not_applicable_free.cpp │ │ ├── can_require_concept_not_applicable_member.cpp │ │ ├── can_require_concept_not_applicable_static.cpp │ │ ├── can_require_concept_not_applicable_unsupported.cpp │ │ ├── can_require_concept_static.cpp │ │ ├── can_require_concept_unsupported.cpp │ │ ├── can_require_free.cpp │ │ ├── can_require_member.cpp │ │ ├── can_require_not_applicable_free.cpp │ │ ├── can_require_not_applicable_member.cpp │ │ ├── can_require_not_applicable_static.cpp │ │ ├── can_require_not_applicable_unsupported.cpp │ │ ├── can_require_static.cpp │ │ ├── can_require_unsupported.cpp │ │ ├── prefer_free_prefer.cpp │ │ ├── prefer_free_require.cpp │ │ ├── prefer_member_prefer.cpp │ │ ├── prefer_member_require.cpp │ │ ├── prefer_static.cpp │ │ ├── prefer_unsupported.cpp │ │ ├── query_free.cpp │ │ ├── query_member.cpp │ │ ├── query_static.cpp │ │ ├── require_concept_free.cpp │ │ ├── require_concept_member.cpp │ │ ├── require_concept_static.cpp │ │ ├── require_free.cpp │ │ ├── require_member.cpp │ │ └── require_static.cpp │ └── cpp14 │ │ ├── Jamfile.v2 │ │ ├── can_prefer_free_prefer.cpp │ │ ├── can_prefer_free_require.cpp │ │ ├── can_prefer_member_prefer.cpp │ │ ├── can_prefer_member_require.cpp │ │ ├── can_prefer_not_applicable_free_prefer.cpp │ │ ├── can_prefer_not_applicable_free_require.cpp │ │ ├── can_prefer_not_applicable_member_prefer.cpp │ │ ├── can_prefer_not_applicable_member_require.cpp │ │ ├── can_prefer_not_applicable_static.cpp │ │ ├── can_prefer_not_applicable_unsupported.cpp │ │ ├── can_prefer_not_preferable_free_prefer.cpp │ │ ├── can_prefer_not_preferable_free_require.cpp │ │ ├── can_prefer_not_preferable_member_prefer.cpp │ │ ├── can_prefer_not_preferable_member_require.cpp │ │ ├── can_prefer_not_preferable_static.cpp │ │ ├── can_prefer_not_preferable_unsupported.cpp │ │ ├── can_prefer_static.cpp │ │ ├── can_prefer_unsupported.cpp │ │ ├── can_query_free.cpp │ │ ├── can_query_member.cpp │ │ ├── can_query_not_applicable_free.cpp │ │ ├── can_query_not_applicable_member.cpp │ │ ├── can_query_not_applicable_static.cpp │ │ ├── can_query_not_applicable_unsupported.cpp │ │ ├── can_query_static.cpp │ │ ├── can_query_unsupported.cpp │ │ ├── can_require_concept_free.cpp │ │ ├── can_require_concept_member.cpp │ │ ├── can_require_concept_not_applicable_free.cpp │ │ ├── can_require_concept_not_applicable_member.cpp │ │ ├── can_require_concept_not_applicable_static.cpp │ │ ├── can_require_concept_not_applicable_unsupported.cpp │ │ ├── can_require_concept_static.cpp │ │ ├── can_require_concept_unsupported.cpp │ │ ├── can_require_free.cpp │ │ ├── can_require_member.cpp │ │ ├── can_require_not_applicable_free.cpp │ │ ├── can_require_not_applicable_member.cpp │ │ ├── can_require_not_applicable_static.cpp │ │ ├── can_require_not_applicable_unsupported.cpp │ │ ├── can_require_static.cpp │ │ ├── can_require_unsupported.cpp │ │ ├── prefer_free_prefer.cpp │ │ ├── prefer_free_require.cpp │ │ ├── prefer_member_prefer.cpp │ │ ├── prefer_member_require.cpp │ │ ├── prefer_static.cpp │ │ ├── prefer_unsupported.cpp │ │ ├── query_free.cpp │ │ ├── query_member.cpp │ │ ├── query_static.cpp │ │ ├── require_concept_free.cpp │ │ ├── require_concept_member.cpp │ │ ├── require_concept_static.cpp │ │ ├── require_free.cpp │ │ ├── require_member.cpp │ │ └── require_static.cpp ├── random_access_file.cpp ├── read.cpp ├── read_at.cpp ├── read_until.cpp ├── readable_pipe.cpp ├── recycling_allocator.cpp ├── redirect_error.cpp ├── registered_buffer.cpp ├── serial_port.cpp ├── serial_port_base.cpp ├── signal_set.cpp ├── signal_set_base.cpp ├── socket_base.cpp ├── spawn.cpp ├── ssl │ ├── Jamfile.v2 │ ├── context.cpp │ ├── context_base.cpp │ ├── error.cpp │ ├── host_name_verification.cpp │ ├── stream.cpp │ └── stream_base.cpp ├── static_thread_pool.cpp ├── steady_timer.cpp ├── strand.cpp ├── stream_file.cpp ├── streambuf.cpp ├── system_context.cpp ├── system_executor.cpp ├── system_timer.cpp ├── this_coro.cpp ├── thread_pool.cpp ├── time_traits.cpp ├── ts │ ├── buffer.cpp │ ├── executor.cpp │ ├── internet.cpp │ ├── io_context.cpp │ ├── net.cpp │ ├── netfwd.cpp │ ├── socket.cpp │ └── timer.cpp ├── unit_test.hpp ├── use_awaitable.cpp ├── use_future.cpp ├── uses_executor.cpp ├── wait_traits.cpp ├── windows │ ├── basic_object_handle.cpp │ ├── basic_overlapped_handle.cpp │ ├── basic_random_access_handle.cpp │ ├── basic_stream_handle.cpp │ ├── object_handle.cpp │ ├── overlapped_handle.cpp │ ├── overlapped_ptr.cpp │ ├── random_access_handle.cpp │ └── stream_handle.cpp ├── writable_pipe.cpp ├── write.cpp └── write_at.cpp └── tools ├── handlerlive.pl ├── handlertree.pl └── handlerviz.pl /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Upstream repository located at https://github.com/chriskohlhoff/asio 4 | url: https://github.com/chriskohlhoff/asio/issues 5 | about: | 6 | The source code in this repository is generated from upstream. 7 | Please raise new issues there. 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | The source code in this repository is generated from an upstream repository at https://github.com/chriskohlhoff/asio. 2 | 3 | Please consider raising new pull requests at https://github.com/chriskohlhoff/asio/pulls. 4 | -------------------------------------------------------------------------------- /.github/move.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Move Issues - https://github.com/dessant/move-issues 2 | 3 | # Delete the command comment when it contains no other content 4 | deleteCommand: true 5 | 6 | # Close the source issue after moving 7 | closeSourceIssue: true 8 | 9 | # Lock the source issue after moving 10 | lockSourceIssue: true 11 | 12 | # Mention issue and comment authors 13 | mentionAuthors: true 14 | 15 | # Preserve mentions in the issue content 16 | keepContentMentions: false 17 | 18 | # Move labels that also exist on the target repository 19 | moveLabels: false 20 | 21 | # Set custom aliases for targets 22 | aliases: 23 | upstream: chriskohlhoff/asio 24 | 25 | # Repository to extend settings from 26 | # _extends: repo 27 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Generated by `boostdep --cmake asio` 2 | # Copyright 2020, 2021 Peter Dimov 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # https://www.boost.org/LICENSE_1_0.txt 5 | 6 | cmake_minimum_required(VERSION 3.8...3.20) 7 | 8 | project(boost_asio VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) 9 | 10 | add_library(boost_asio INTERFACE) 11 | add_library(Boost::asio ALIAS boost_asio) 12 | 13 | target_include_directories(boost_asio INTERFACE include) 14 | 15 | target_link_libraries(boost_asio 16 | INTERFACE 17 | Boost::align 18 | Boost::assert 19 | Boost::config 20 | Boost::context 21 | Boost::date_time 22 | Boost::system 23 | Boost::throw_exception 24 | ) 25 | 26 | target_compile_features(boost_asio INTERFACE cxx_std_11) 27 | 28 | if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") 29 | 30 | add_subdirectory(test) 31 | 32 | endif() 33 | -------------------------------------------------------------------------------- /build.jam: -------------------------------------------------------------------------------- 1 | # Copyright René Ferdinand Rivera Morell 2023-2024 2 | # Distributed under the Boost Software License, Version 1.0. 3 | # (See accompanying file LICENSE_1_0.txt or copy at 4 | # http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | require-b2 5.2 ; 7 | 8 | constant boost_dependencies : 9 | /boost/align//boost_align 10 | /boost/assert//boost_assert 11 | /boost/config//boost_config 12 | /boost/context//boost_context 13 | /boost/date_time//boost_date_time 14 | /boost/system//boost_system 15 | /boost/throw_exception//boost_throw_exception ; 16 | 17 | project /boost/asio 18 | : common-requirements 19 | include 20 | ; 21 | 22 | local examples = [ glob-tree-ex example : Jamfile.v2 ] ; 23 | 24 | explicit 25 | [ alias boost_asio : : : : $(boost_dependencies) ] 26 | [ alias all : boost_asio test $(examples:D) ] 27 | ; 28 | 29 | call-if : boost-library asio 30 | ; 31 | 32 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | /html 2 | -------------------------------------------------------------------------------- /doc/doxy2qbk.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 4 | # 5 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 6 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | use strict; 9 | 10 | system("doxygen reference.dox"); 11 | chdir("xml"); 12 | system("xsltproc combine.xslt index.xml > all.xml"); 13 | chdir(".."); 14 | system("xsltproc reference.xsl xml/all.xml > reference.qbk"); 15 | system("rm -rf xml"); 16 | 17 | system("doxygen tutorial.dox"); 18 | chdir("xml"); 19 | system("xsltproc combine.xslt index.xml > all.xml"); 20 | chdir(".."); 21 | system("xsltproc tutorial.xsl xml/all.xml > tutorial.qbk"); 22 | system("rm -rf xml reference.tags"); 23 | -------------------------------------------------------------------------------- /doc/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /doc/model_dox.txt: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | /** 9 | \page asynchronous_operation asynchronous operation 10 | */ 11 | 12 | /** 13 | \page completion_token completion token 14 | */ 15 | -------------------------------------------------------------------------------- /doc/noncopyable_dox.txt: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | /** 9 | \class noncopyable 10 | */ 11 | -------------------------------------------------------------------------------- /doc/overview/async_op1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/async_op1.png -------------------------------------------------------------------------------- /doc/overview/async_op2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/async_op2.png -------------------------------------------------------------------------------- /doc/overview/model/async_agent_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_agent_chain.png -------------------------------------------------------------------------------- /doc/overview/model/async_agent_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_agent_model.png -------------------------------------------------------------------------------- /doc/overview/model/async_child_agent_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_child_agent_chain.png -------------------------------------------------------------------------------- /doc/overview/model/async_op_init_complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_op_init_complete.png -------------------------------------------------------------------------------- /doc/overview/model/async_op_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_op_model.png -------------------------------------------------------------------------------- /doc/overview/model/async_op_phases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_op_phases.png -------------------------------------------------------------------------------- /doc/overview/model/async_op_trivial_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/async_op_trivial_chain.png -------------------------------------------------------------------------------- /doc/overview/model/completion_token_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/completion_token_model.png -------------------------------------------------------------------------------- /doc/overview/model/completion_token_transform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/completion_token_transform.png -------------------------------------------------------------------------------- /doc/overview/model/higher_level_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/model/higher_level_model.png -------------------------------------------------------------------------------- /doc/overview/proactor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/proactor.png -------------------------------------------------------------------------------- /doc/overview/sync_op.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/asio/62864c570afcb7234442168ecacd53af701d7d9e/doc/overview/sync_op.png -------------------------------------------------------------------------------- /doc/requirements/AcceptHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:AcceptHandler Accept handler requirements] 9 | 10 | An accept handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of an accept handler 12 | class should work correctly in the expression `h(ec)`, where `ec` is an lvalue 13 | of type `const error_code`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/AcceptableProtocol.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:AcceptableProtocol Acceptable protocol requirements] 9 | 10 | A type `X` meets the `AcceptableProtocol` requirements if it satisfies the 11 | requirements of [link boost_asio.reference.Protocol `Protocol`] as well as the 12 | additional requirements listed below. 13 | 14 | [table AcceptableProtocol requirements 15 | [[expression] [return type] [assertion/note[br]pre/post-conditions]] 16 | [ 17 | [`X::socket`] 18 | [A type that satisfies the requirements of `Destructible` (C++Std 19 | \[destructible\]) and `MoveConstructible` (C++Std \[moveconstructible\]), 20 | and that is publicly and unambiguously derived from `basic_socket`.] 21 | [] 22 | ] 23 | ] 24 | 25 | [endsect] 26 | -------------------------------------------------------------------------------- /doc/requirements/BufferedHandshakeHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:BufferedHandshakeHandler Buffered handshake handler requirements] 9 | 10 | A buffered handshake handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a buffered handshake handler 12 | class should work correctly in the expression `h(ec, s)`, where `ec` is an 13 | lvalue of type `const error_code` and `s` is an lvalue of type `const size_t`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/ConnectHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:ConnectHandler Connect handler requirements] 9 | 10 | A connect handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a connect handler 12 | class should work correctly in the expression `h(ec)`, where `ec` is an lvalue 13 | of type `const error_code`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/DynamicBuffer.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:DynamicBuffer Dynamic buffer requirements] 9 | 10 | See: 11 | 12 | * [link boost_asio.reference.DynamicBuffer_v1 Dynamic buffer requirements (version 1)] 13 | 14 | * [link boost_asio.reference.DynamicBuffer_v2 Dynamic buffer requirements (version 2)] 15 | 16 | [endsect] 17 | -------------------------------------------------------------------------------- /doc/requirements/Handler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:Handler Handlers] 9 | 10 | A handler must satisfy the requirements of `Destructible` (C++Std 11 | [destructible]) and `MoveConstructible` (C++Std [moveconstructible]). 12 | 13 | A handler may expose additional information and behaviour via [link 14 | boost_asio.overview.model.associators associators], such as [link 15 | boost_asio.reference.associated_allocator `associated_allocator`], [link 16 | boost_asio.reference.associated_executor `associated_executor`], and [link 17 | boost_asio.reference.associated_cancellation_slot `associated_cancellation_slot`]. 18 | 19 | [endsect] 20 | -------------------------------------------------------------------------------- /doc/requirements/HandshakeHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:HandshakeHandler SSL handshake handler requirements] 9 | 10 | A handshake handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a handshake handler 12 | class should work correctly in the expression `h(ec)`, where `ec` is an lvalue 13 | of type `const error_code`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/IoControlCommand.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:IoControlCommand I/O control command requirements] 9 | 10 | A type `X` meets the `IoControlCommand` requirements if it satisfies the 11 | requirements listed below. 12 | 13 | In the table below, `a` denotes a (possibly const) value of type `X`, and `b` 14 | denotes a value of type `X`. 15 | 16 | [table IoControlCommand requirements for extensible implementations 17 | [[expression] [type] [assertion/note[br]pre/post-conditions]] 18 | [ 19 | [`a.name()`] 20 | [`int`] 21 | [ 22 | Returns a value suitable for passing as the /request/ argument to 23 | __POSIX__ __ioctl__ (or equivalent). 24 | ] 25 | ] 26 | [ 27 | [`b.data()`] 28 | [`void*`] 29 | [ 30 | ] 31 | ] 32 | ] 33 | 34 | [endsect] 35 | -------------------------------------------------------------------------------- /doc/requirements/IteratorConnectHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:IteratorConnectHandler Iterator connect handler requirements] 9 | 10 | An iterator connect handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of an iterator connect handler 12 | class should work correctly in the expression `h(ec, i)`, where `ec` is an 13 | lvalue of type `const error_code` and `i` is an lvalue of the type `Iterator` 14 | used in the corresponding `async_connect()` function. 15 | 16 | [endsect] 17 | -------------------------------------------------------------------------------- /doc/requirements/MoveAcceptHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:MoveAcceptHandler Move accept handler requirements] 9 | 10 | A move accept handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a move accept handler class 12 | should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of 13 | type `const error_code` and `s` is an lvalue of the nested type 14 | `Protocol::socket` for the type `Protocol` of the socket class template. 15 | 16 | [endsect] 17 | -------------------------------------------------------------------------------- /doc/requirements/ProtoAllocator.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:ProtoAllocator Proto-allocator requirements] 9 | 10 | A type `A` meets the proto-allocator requirements if `A` is `CopyConstructible` 11 | (C++Std [copyconstructible]), `Destructible` (C++Std [destructible]), and 12 | `allocator_traits::rebind_alloc` meets the allocator requirements (C++Std 13 | [allocator.requirements]), where `U` is an object type. [inline_note For 14 | example, `std::allocator` meets the proto-allocator requirements but not 15 | the allocator requirements.] No constructor, comparison operator, copy 16 | operation, move operation, or swap operation on these types shall exit via an 17 | exception. 18 | 19 | [endsect] 20 | -------------------------------------------------------------------------------- /doc/requirements/RangeConnectHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:RangeConnectHandler Range connect handler requirements] 9 | 10 | A range connect handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a range connect handler class 12 | should work correctly in the expression `h(ec, ep)`, where `ec` is an lvalue of 13 | type `const error_code` and `ep` is an lvalue of the type `Protocol::endpoint` 14 | for the `Protocol` type in the corresponding `async_connect()` function. 15 | 16 | [endsect] 17 | -------------------------------------------------------------------------------- /doc/requirements/ReadHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:ReadHandler Read handler requirements] 9 | 10 | A read handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a read handler class 12 | should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of 13 | type `const error_code` and `s` is an lvalue of type `const size_t`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/ResolveHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:ResolveHandler Resolve handler requirements] 9 | 10 | A resolve handler must meet the requirements for a [link boost_asio.reference.Handler 11 | handler]. A value `h` of a resolve handler class should work correctly in the 12 | expression `h(ec, r)`, where `ec` is an lvalue of type `const error_code` and 13 | `r` is an lvalue of type `const ip::basic_resolver_results`. 14 | `InternetProtocol` is the template parameter of the [link 15 | boost_asio.reference.ip__basic_resolver `ip::basic_resolver<>`] which is used to 16 | initiate the asynchronous operation. 17 | 18 | [endsect] 19 | -------------------------------------------------------------------------------- /doc/requirements/ShutdownHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:ShutdownHandler SSL shutdown handler requirements] 9 | 10 | A shutdown handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a shutdown handler 12 | class should work correctly in the expression `h(ec)`, where `ec` is an lvalue 13 | of type `const error_code`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/SignalHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:SignalHandler Signal handler requirements] 9 | 10 | A signal handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a signal handler class 12 | should work correctly in the expression `h(ec, n)`, where `ec` is an lvalue of 13 | type `const error_code` and `n` is an lvalue of type `const int`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/WaitHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:WaitHandler Wait handler requirements] 9 | 10 | A wait handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a wait handler class 12 | should work correctly in the expression `h(ec)`, where `ec` is an lvalue of 13 | type `const error_code`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/requirements/WriteHandler.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | / Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | / 4 | / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | /] 7 | 8 | [section:WriteHandler Write handler requirements] 9 | 10 | A write handler must meet the requirements for a [link 11 | boost_asio.reference.Handler handler]. A value `h` of a write handler class 12 | should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of 13 | type `const error_code` and `s` is an lvalue of type `const size_t`. 14 | 15 | [endsect] 16 | -------------------------------------------------------------------------------- /doc/std_exception_dox.txt: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | /** 9 | \namespace std 10 | */ 11 | 12 | /** 13 | \class std::exception 14 | */ 15 | -------------------------------------------------------------------------------- /example/cpp11/allocation/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe server 16 | : server.cpp 17 | /boost/system//boost_system 18 | : BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | -------------------------------------------------------------------------------- /example/cpp11/buffers/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe server 16 | : reference_counted.cpp 17 | /boost/system//boost_system 18 | : BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | -------------------------------------------------------------------------------- /example/cpp11/build.jam: -------------------------------------------------------------------------------- 1 | # Copyright René Ferdinand Rivera Morell 2023-2024. 2 | # 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # (See accompanying file LICENSE_1_0.txt or copy at 5 | # http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | project 8 | : requirements 9 | /boost/asio//boost_asio 10 | 11 11 | ; 12 | -------------------------------------------------------------------------------- /example/cpp11/deferred/deferred_1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // deferred_1.cpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include 12 | #include 13 | 14 | using boost::asio::deferred; 15 | 16 | int main() 17 | { 18 | boost::asio::io_context ctx; 19 | 20 | boost::asio::steady_timer timer(ctx); 21 | timer.expires_after(std::chrono::seconds(1)); 22 | 23 | auto deferred_op = timer.async_wait(deferred); 24 | 25 | std::move(deferred_op)( 26 | [](boost::system::error_code ec) 27 | { 28 | std::cout << "timer wait finished: " << ec.message() << "\n"; 29 | } 30 | ); 31 | 32 | ctx.run(); 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /example/cpp11/files/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | searched-lib uring ; # LINUX 9 | searched-lib ws2_32 ; # NT 10 | searched-lib mswsock ; # NT 11 | 12 | project 13 | : requirements 14 | /boost/system//boost_system 15 | /boost/thread//boost_thread 16 | BOOST_ALL_NO_LIB=1 17 | multi 18 | linux:BOOST_ASIO_HAS_IO_URING=1 19 | linux:uring 20 | windows:_WIN32_WINNT=0x0600 21 | windows,gcc:ws2_32 22 | windows,gcc:mswsock 23 | ; 24 | 25 | exe async_file_copy : async_file_copy.cpp ; 26 | exe blocking_file_copy : blocking_file_copy.cpp ; 27 | -------------------------------------------------------------------------------- /example/cpp11/futures/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe server 16 | : daytime_client.cpp 17 | /boost/system//boost_system 18 | : BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | -------------------------------------------------------------------------------- /example/cpp11/http/server/connection_manager.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // connection_manager.cpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "connection_manager.hpp" 12 | 13 | namespace http { 14 | namespace server { 15 | 16 | connection_manager::connection_manager() 17 | { 18 | } 19 | 20 | void connection_manager::start(connection_ptr c) 21 | { 22 | connections_.insert(c); 23 | c->start(); 24 | } 25 | 26 | void connection_manager::stop(connection_ptr c) 27 | { 28 | connections_.erase(c); 29 | c->stop(); 30 | } 31 | 32 | void connection_manager::stop_all() 33 | { 34 | for (auto c: connections_) 35 | c->stop(); 36 | connections_.clear(); 37 | } 38 | 39 | } // namespace server 40 | } // namespace http 41 | -------------------------------------------------------------------------------- /example/cpp11/http/server/header.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // header.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_HEADER_HPP 12 | #define HTTP_HEADER_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server { 18 | 19 | struct header 20 | { 21 | std::string name; 22 | std::string value; 23 | }; 24 | 25 | } // namespace server 26 | } // namespace http 27 | 28 | #endif // HTTP_HEADER_HPP 29 | -------------------------------------------------------------------------------- /example/cpp11/http/server/mime_types.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.cpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "mime_types.hpp" 12 | 13 | namespace http { 14 | namespace server { 15 | namespace mime_types { 16 | 17 | struct mapping 18 | { 19 | const char* extension; 20 | const char* mime_type; 21 | } mappings[] = 22 | { 23 | { "gif", "image/gif" }, 24 | { "htm", "text/html" }, 25 | { "html", "text/html" }, 26 | { "jpg", "image/jpeg" }, 27 | { "png", "image/png" } 28 | }; 29 | 30 | std::string extension_to_type(const std::string& extension) 31 | { 32 | for (mapping m: mappings) 33 | { 34 | if (m.extension == extension) 35 | { 36 | return m.mime_type; 37 | } 38 | } 39 | 40 | return "text/plain"; 41 | } 42 | 43 | } // namespace mime_types 44 | } // namespace server 45 | } // namespace http 46 | -------------------------------------------------------------------------------- /example/cpp11/http/server/mime_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_MIME_TYPES_HPP 12 | #define HTTP_MIME_TYPES_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server { 18 | namespace mime_types { 19 | 20 | /// Convert a file extension into a MIME type. 21 | std::string extension_to_type(const std::string& extension); 22 | 23 | } // namespace mime_types 24 | } // namespace server 25 | } // namespace http 26 | 27 | #endif // HTTP_MIME_TYPES_HPP 28 | -------------------------------------------------------------------------------- /example/cpp11/http/server/request.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // request.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_REQUEST_HPP 12 | #define HTTP_REQUEST_HPP 13 | 14 | #include 15 | #include 16 | #include "header.hpp" 17 | 18 | namespace http { 19 | namespace server { 20 | 21 | /// A request received from a client. 22 | struct request 23 | { 24 | std::string method; 25 | std::string uri; 26 | int http_version_major; 27 | int http_version_minor; 28 | std::vector
headers; 29 | }; 30 | 31 | } // namespace server 32 | } // namespace http 33 | 34 | #endif // HTTP_REQUEST_HPP 35 | -------------------------------------------------------------------------------- /example/cpp11/http/server2/header.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // header.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER2_HEADER_HPP 12 | #define HTTP_SERVER2_HEADER_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server2 { 18 | 19 | struct header 20 | { 21 | std::string name; 22 | std::string value; 23 | }; 24 | 25 | } // namespace server2 26 | } // namespace http 27 | 28 | #endif // HTTP_SERVER2_HEADER_HPP 29 | -------------------------------------------------------------------------------- /example/cpp11/http/server2/mime_types.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.cpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "mime_types.hpp" 12 | 13 | namespace http { 14 | namespace server2 { 15 | namespace mime_types { 16 | 17 | struct mapping 18 | { 19 | const char* extension; 20 | const char* mime_type; 21 | } mappings[] = 22 | { 23 | { "gif", "image/gif" }, 24 | { "htm", "text/html" }, 25 | { "html", "text/html" }, 26 | { "jpg", "image/jpeg" }, 27 | { "png", "image/png" }, 28 | { 0, 0 } // Marks end of list. 29 | }; 30 | 31 | std::string extension_to_type(const std::string& extension) 32 | { 33 | for (mapping* m = mappings; m->extension; ++m) 34 | { 35 | if (m->extension == extension) 36 | { 37 | return m->mime_type; 38 | } 39 | } 40 | 41 | return "text/plain"; 42 | } 43 | 44 | } // namespace mime_types 45 | } // namespace server2 46 | } // namespace http 47 | -------------------------------------------------------------------------------- /example/cpp11/http/server2/mime_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER2_MIME_TYPES_HPP 12 | #define HTTP_SERVER2_MIME_TYPES_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server2 { 18 | namespace mime_types { 19 | 20 | /// Convert a file extension into a MIME type. 21 | std::string extension_to_type(const std::string& extension); 22 | 23 | } // namespace mime_types 24 | } // namespace server2 25 | } // namespace http 26 | 27 | #endif // HTTP_SERVER2_MIME_TYPES_HPP 28 | -------------------------------------------------------------------------------- /example/cpp11/http/server2/request.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // request.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER2_REQUEST_HPP 12 | #define HTTP_SERVER2_REQUEST_HPP 13 | 14 | #include 15 | #include 16 | #include "header.hpp" 17 | 18 | namespace http { 19 | namespace server2 { 20 | 21 | /// A request received from a client. 22 | struct request 23 | { 24 | std::string method; 25 | std::string uri; 26 | int http_version_major; 27 | int http_version_minor; 28 | std::vector
headers; 29 | }; 30 | 31 | } // namespace server2 32 | } // namespace http 33 | 34 | #endif // HTTP_SERVER2_REQUEST_HPP 35 | -------------------------------------------------------------------------------- /example/cpp11/http/server3/header.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // header.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER3_HEADER_HPP 12 | #define HTTP_SERVER3_HEADER_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server3 { 18 | 19 | struct header 20 | { 21 | std::string name; 22 | std::string value; 23 | }; 24 | 25 | } // namespace server3 26 | } // namespace http 27 | 28 | #endif // HTTP_SERVER3_HEADER_HPP 29 | -------------------------------------------------------------------------------- /example/cpp11/http/server3/mime_types.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.cpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "mime_types.hpp" 12 | 13 | namespace http { 14 | namespace server3 { 15 | namespace mime_types { 16 | 17 | struct mapping 18 | { 19 | const char* extension; 20 | const char* mime_type; 21 | } mappings[] = 22 | { 23 | { "gif", "image/gif" }, 24 | { "htm", "text/html" }, 25 | { "html", "text/html" }, 26 | { "jpg", "image/jpeg" }, 27 | { "png", "image/png" }, 28 | { 0, 0 } // Marks end of list. 29 | }; 30 | 31 | std::string extension_to_type(const std::string& extension) 32 | { 33 | for (mapping* m = mappings; m->extension; ++m) 34 | { 35 | if (m->extension == extension) 36 | { 37 | return m->mime_type; 38 | } 39 | } 40 | 41 | return "text/plain"; 42 | } 43 | 44 | } // namespace mime_types 45 | } // namespace server3 46 | } // namespace http 47 | -------------------------------------------------------------------------------- /example/cpp11/http/server3/mime_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER3_MIME_TYPES_HPP 12 | #define HTTP_SERVER3_MIME_TYPES_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server3 { 18 | namespace mime_types { 19 | 20 | /// Convert a file extension into a MIME type. 21 | std::string extension_to_type(const std::string& extension); 22 | 23 | } // namespace mime_types 24 | } // namespace server3 25 | } // namespace http 26 | 27 | #endif // HTTP_SERVER3_MIME_TYPES_HPP 28 | -------------------------------------------------------------------------------- /example/cpp11/http/server3/request.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // request.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER3_REQUEST_HPP 12 | #define HTTP_SERVER3_REQUEST_HPP 13 | 14 | #include 15 | #include 16 | #include "header.hpp" 17 | 18 | namespace http { 19 | namespace server3 { 20 | 21 | /// A request received from a client. 22 | struct request 23 | { 24 | std::string method; 25 | std::string uri; 26 | int http_version_major; 27 | int http_version_minor; 28 | std::vector
headers; 29 | }; 30 | 31 | } // namespace server3 32 | } // namespace http 33 | 34 | #endif // HTTP_SERVER3_REQUEST_HPP 35 | -------------------------------------------------------------------------------- /example/cpp11/http/server4/header.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // header.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER4_HEADER_HPP 12 | #define HTTP_SERVER4_HEADER_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server4 { 18 | 19 | struct header 20 | { 21 | std::string name; 22 | std::string value; 23 | }; 24 | 25 | } // namespace server4 26 | } // namespace http 27 | 28 | #endif // HTTP_SERVER4_HEADER_HPP 29 | -------------------------------------------------------------------------------- /example/cpp11/http/server4/mime_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // mime_types.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER4_MIME_TYPES_HPP 12 | #define HTTP_SERVER4_MIME_TYPES_HPP 13 | 14 | #include 15 | 16 | namespace http { 17 | namespace server4 { 18 | namespace mime_types { 19 | 20 | /// Convert a file extension into a MIME type. 21 | std::string extension_to_type(const std::string& extension); 22 | 23 | } // namespace mime_types 24 | } // namespace server4 25 | } // namespace http 26 | 27 | #endif // HTTP_SERVER4_MIME_TYPES_HPP 28 | -------------------------------------------------------------------------------- /example/cpp11/http/server4/request.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // request.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef HTTP_SERVER4_REQUEST_HPP 12 | #define HTTP_SERVER4_REQUEST_HPP 13 | 14 | #include 15 | #include 16 | #include "header.hpp" 17 | 18 | namespace http { 19 | namespace server4 { 20 | 21 | /// A request received from a client. 22 | struct request 23 | { 24 | std::string method; 25 | std::string uri; 26 | int http_version_major; 27 | int http_version_minor; 28 | std::vector
headers; 29 | }; 30 | 31 | } // namespace server4 32 | } // namespace http 33 | 34 | #endif // HTTP_SERVER4_REQUEST_HPP 35 | -------------------------------------------------------------------------------- /example/cpp11/icmp/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe ping 16 | : ping.cpp 17 | /boost/system//boost_system 18 | /boost/chrono//boost_chrono 19 | : BOOST_ALL_NO_LIB=1 20 | multi 21 | solaris:socket 22 | solaris:nsl 23 | windows:_WIN32_WINNT=0x0501 24 | windows,gcc:ws2_32 25 | windows,gcc:mswsock 26 | windows,gcc-cygwin:__USE_W32_SOCKETS 27 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 28 | hpux:ipv6 29 | haiku:network 30 | ; 31 | -------------------------------------------------------------------------------- /example/cpp11/invocation/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe prioritised_handlers 16 | : prioritised_handlers.cpp 17 | /boost/system//boost_system 18 | : BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | -------------------------------------------------------------------------------- /example/cpp11/iostreams/daytime_client.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // daytime_client.cpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | using boost::asio::ip::tcp; 16 | 17 | int main(int argc, char* argv[]) 18 | { 19 | try 20 | { 21 | if (argc != 2) 22 | { 23 | std::cerr << "Usage: daytime_client " << std::endl; 24 | return 1; 25 | } 26 | 27 | tcp::iostream s(argv[1], "daytime"); 28 | if (!s) 29 | { 30 | std::cout << "Unable to connect: " << s.error().message() << std::endl; 31 | return 1; 32 | } 33 | 34 | std::string line; 35 | std::getline(s, line); 36 | std::cout << line << std::endl; 37 | } 38 | catch (std::exception& e) 39 | { 40 | std::cout << "Exception: " << e.what() << std::endl; 41 | } 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /example/cpp11/multicast/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | project 16 | : requirements 17 | /boost/system//boost_system 18 | BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | 31 | exe receiver : receiver.cpp ; 32 | exe sender : sender.cpp ; 33 | -------------------------------------------------------------------------------- /example/cpp11/nonblocking/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe third_party_lib 16 | : third_party_lib.cpp 17 | /boost/system//boost_system 18 | : BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | -------------------------------------------------------------------------------- /example/cpp11/services/logger.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // logger.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef SERVICES_LOGGER_HPP 12 | #define SERVICES_LOGGER_HPP 13 | 14 | #include "basic_logger.hpp" 15 | #include "logger_service.hpp" 16 | 17 | namespace services { 18 | 19 | /// Typedef for typical logger usage. 20 | typedef basic_logger logger; 21 | 22 | } // namespace services 23 | 24 | #endif // SERVICES_LOGGER_HPP 25 | -------------------------------------------------------------------------------- /example/cpp11/services/logger_service.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // logger_service.cpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "logger_service.hpp" 12 | -------------------------------------------------------------------------------- /example/cpp11/socks4/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe server 16 | : sync_client.cpp 17 | /boost/system//boost_system 18 | /boost/chrono//boost_chrono 19 | : BOOST_ALL_NO_LIB=1 20 | multi 21 | solaris:socket 22 | solaris:nsl 23 | windows:_WIN32_WINNT=0x0501 24 | windows,gcc:ws2_32 25 | windows,gcc:mswsock 26 | windows,gcc-cygwin:__USE_W32_SOCKETS 27 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 28 | hpux:ipv6 29 | haiku:network 30 | ; 31 | -------------------------------------------------------------------------------- /example/cpp11/spawn/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe server 16 | : echo_server.cpp 17 | /boost/context//boost_context 18 | /boost/system//boost_system 19 | : BOOST_ALL_NO_LIB=1 20 | multi 21 | solaris:socket 22 | solaris:nsl 23 | windows:_WIN32_WINNT=0x0501 24 | windows,gcc:ws2_32 25 | windows,gcc:mswsock 26 | windows,gcc-cygwin:__USE_W32_SOCKETS 27 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 28 | hpux:ipv6 29 | haiku:network 30 | ; 31 | -------------------------------------------------------------------------------- /example/cpp11/ssl/README: -------------------------------------------------------------------------------- 1 | The passphrase for both the CA and server private keys is "test". 2 | 3 | 4 | ------------------------------------------------------------------------------- 5 | Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | 7 | Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | -------------------------------------------------------------------------------- /example/cpp11/timers/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | exe time_t_timer 16 | : time_t_timer.cpp 17 | /boost/system//boost_system 18 | /boost/chrono//boost_chrono 19 | : BOOST_ALL_NO_LIB=1 20 | multi 21 | solaris:socket 22 | solaris:nsl 23 | windows:_WIN32_WINNT=0x0501 24 | windows,gcc:ws2_32 25 | windows,gcc:mswsock 26 | windows,gcc-cygwin:__USE_W32_SOCKETS 27 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 28 | hpux:ipv6 29 | haiku:network 30 | ; 31 | -------------------------------------------------------------------------------- /example/cpp11/tutorial/timer1/timer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // timer.cpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include 12 | #include 13 | 14 | int main() 15 | { 16 | boost::asio::io_context io; 17 | 18 | boost::asio::steady_timer t(io, boost::asio::chrono::seconds(5)); 19 | t.wait(); 20 | 21 | std::cout << "Hello, world!" << std::endl; 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /example/cpp11/tutorial/timer2/timer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // timer.cpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include 12 | #include 13 | 14 | void print(const boost::system::error_code& /*e*/) 15 | { 16 | std::cout << "Hello, world!" << std::endl; 17 | } 18 | 19 | int main() 20 | { 21 | boost::asio::io_context io; 22 | 23 | boost::asio::steady_timer t(io, boost::asio::chrono::seconds(5)); 24 | t.async_wait(&print); 25 | 26 | io.run(); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /example/cpp11/type_erasure/sleep.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // sleep.cpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "sleep.hpp" 12 | #include 13 | #include 14 | #include 15 | 16 | void async_sleep_impl( 17 | boost::asio::any_completion_handler handler, 18 | boost::asio::any_io_executor ex, std::chrono::nanoseconds duration) 19 | { 20 | auto timer = std::make_shared(ex, duration); 21 | timer->async_wait(boost::asio::consign(std::move(handler), timer)); 22 | } 23 | -------------------------------------------------------------------------------- /example/cpp11/type_erasure/stdin_line_reader.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // stdin_line_reader.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef STDIN_LINE_READER_HPP 12 | #define STDIN_LINE_READER_HPP 13 | 14 | #include "line_reader.hpp" 15 | #include 16 | 17 | class stdin_line_reader : public line_reader 18 | { 19 | public: 20 | explicit stdin_line_reader(boost::asio::any_io_executor ex); 21 | 22 | private: 23 | void async_read_line_impl(std::string prompt, 24 | boost::asio::any_completion_handler handler) override; 25 | 26 | boost::asio::posix::stream_descriptor stdin_; 27 | std::string buffer_; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /example/cpp14/build.jam: -------------------------------------------------------------------------------- 1 | # Copyright René Ferdinand Rivera Morell 2023-2024. 2 | # 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # (See accompanying file LICENSE_1_0.txt or copy at 5 | # http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | project 8 | : requirements 9 | /boost/asio//boost_asio 10 | 14 11 | ; 12 | -------------------------------------------------------------------------------- /example/cpp14/deferred/deferred_1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // deferred_1.cpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include 12 | #include 13 | 14 | using boost::asio::deferred; 15 | 16 | int main() 17 | { 18 | boost::asio::io_context ctx; 19 | 20 | boost::asio::steady_timer timer(ctx); 21 | timer.expires_after(std::chrono::seconds(1)); 22 | 23 | auto deferred_op = timer.async_wait(deferred); 24 | 25 | std::move(deferred_op)( 26 | [](boost::system::error_code ec) 27 | { 28 | std::cout << "timer wait finished: " << ec.message() << "\n"; 29 | } 30 | ); 31 | 32 | ctx.run(); 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /example/cpp14/iostreams/Jamfile.v2: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 | # 4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | # 7 | 8 | lib socket ; # SOLARIS 9 | lib nsl ; # SOLARIS 10 | lib ws2_32 ; # NT 11 | lib mswsock ; # NT 12 | lib ipv6 ; # HPUX 13 | lib network ; # HAIKU 14 | 15 | project 16 | : requirements 17 | /boost/system//boost_system 18 | BOOST_ALL_NO_LIB=1 19 | multi 20 | solaris:socket 21 | solaris:nsl 22 | windows:_WIN32_WINNT=0x0501 23 | windows,gcc:ws2_32 24 | windows,gcc:mswsock 25 | windows,gcc-cygwin:__USE_W32_SOCKETS 26 | hpux,gcc:_XOPEN_SOURCE_EXTENDED 27 | hpux:ipv6 28 | haiku:network 29 | ; 30 | 31 | exe http_client : http_client.cpp ; 32 | -------------------------------------------------------------------------------- /example/cpp17/build.jam: -------------------------------------------------------------------------------- 1 | # Copyright René Ferdinand Rivera Morell 2023-2024. 2 | # 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # (See accompanying file LICENSE_1_0.txt or copy at 5 | # http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | project 8 | : requirements 9 | /boost/asio//boost_asio 10 | 17 11 | ; 12 | -------------------------------------------------------------------------------- /example/cpp20/build.jam: -------------------------------------------------------------------------------- 1 | # Copyright René Ferdinand Rivera Morell 2023-2024. 2 | # 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # (See accompanying file LICENSE_1_0.txt or copy at 5 | # http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | project 8 | : requirements 9 | /boost/asio//boost_asio 10 | 20 11 | ; 12 | -------------------------------------------------------------------------------- /example/cpp20/type_erasure/sleep.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // sleep.cpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "sleep.hpp" 12 | #include 13 | #include 14 | #include 15 | 16 | void async_sleep_impl( 17 | boost::asio::any_completion_handler handler, 18 | boost::asio::any_io_executor ex, std::chrono::nanoseconds duration) 19 | { 20 | auto timer = std::make_shared(ex, duration); 21 | timer->async_wait(boost::asio::consign(std::move(handler), timer)); 22 | } 23 | -------------------------------------------------------------------------------- /example/cpp20/type_erasure/stdin_line_reader.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // stdin_line_reader.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef STDIN_LINE_READER_HPP 12 | #define STDIN_LINE_READER_HPP 13 | 14 | #include "line_reader.hpp" 15 | #include 16 | 17 | class stdin_line_reader : public line_reader 18 | { 19 | public: 20 | explicit stdin_line_reader(boost::asio::any_io_executor ex); 21 | 22 | private: 23 | void async_read_line_impl(std::string prompt, 24 | boost::asio::any_completion_handler handler) override; 25 | 26 | boost::asio::posix::stream_descriptor stdin_; 27 | std::string buffer_; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/boost/asio/associator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // associator.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2025 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef BOOST_ASIO_ASSOCIATOR_HPP 12 | #define BOOST_ASIO_ASSOCIATOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include 19 | 20 | #include 21 | 22 | namespace boost { 23 | namespace asio { 24 | 25 | /// Used to generically specialise associators for a type. 26 | template