├── .clang-format ├── .github └── workflows │ ├── clang-format.yml │ ├── code-coverage.yml │ ├── linux_clang.yml │ ├── linux_gcc.yml │ ├── linux_llvm_cov.yml │ ├── mac.yml │ └── windows.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake ├── FindBrotli.cmake ├── build.cmake ├── develop.cmake └── find_openssl.cmake ├── codecov.yml ├── docker ├── Dockerfile └── README.md ├── example ├── CMakeLists.txt ├── benchmark.cpp ├── main.cpp └── www │ ├── 404.html │ ├── header │ └── header.html │ ├── index.html │ ├── main.js │ ├── test.css │ ├── test.html │ └── test.js ├── include ├── asio.hpp ├── asio │ ├── any_io_executor.hpp │ ├── append.hpp │ ├── as_tuple.hpp │ ├── associated_allocator.hpp │ ├── associated_cancellation_slot.hpp │ ├── associated_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 │ ├── 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 │ ├── cancellation_signal.hpp │ ├── cancellation_state.hpp │ ├── cancellation_type.hpp │ ├── co_spawn.hpp │ ├── completion_condition.hpp │ ├── compose.hpp │ ├── connect.hpp │ ├── connect_pipe.hpp │ ├── coroutine.hpp │ ├── deadline_timer.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 │ │ ├── bulk_executor_op.hpp │ │ ├── call_stack.hpp │ │ ├── chrono.hpp │ │ ├── chrono_time_traits.hpp │ │ ├── completion_handler.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 │ │ ├── gcc_arm_fenced_block.hpp │ │ ├── gcc_hppa_fenced_block.hpp │ │ ├── gcc_sync_fenced_block.hpp │ │ ├── gcc_x86_fenced_block.hpp │ │ ├── global.hpp │ │ ├── handler_alloc_helpers.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── handler_invoke_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 │ │ ├── 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 │ │ ├── macos_fenced_block.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 │ │ ├── solaris_fenced_block.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 │ │ ├── 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 │ │ ├── variadic_templates.hpp │ │ ├── wait_handler.hpp │ │ ├── wait_op.hpp │ │ ├── win_event.hpp │ │ ├── win_fd_set_adapter.hpp │ │ ├── win_fenced_block.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 │ ├── error.hpp │ ├── error_code.hpp │ ├── execution.hpp │ ├── execution │ │ ├── allocator.hpp │ │ ├── any_executor.hpp │ │ ├── bad_executor.hpp │ │ ├── blocking.hpp │ │ ├── blocking_adaptation.hpp │ │ ├── bulk_execute.hpp │ │ ├── bulk_guarantee.hpp │ │ ├── connect.hpp │ │ ├── context.hpp │ │ ├── context_as.hpp │ │ ├── detail │ │ │ ├── as_invocable.hpp │ │ │ ├── as_operation.hpp │ │ │ ├── as_receiver.hpp │ │ │ ├── bulk_sender.hpp │ │ │ ├── submit_receiver.hpp │ │ │ └── void_receiver.hpp │ │ ├── execute.hpp │ │ ├── executor.hpp │ │ ├── impl │ │ │ ├── bad_executor.ipp │ │ │ └── receiver_invocation_error.ipp │ │ ├── invocable_archetype.hpp │ │ ├── mapping.hpp │ │ ├── occupancy.hpp │ │ ├── operation_state.hpp │ │ ├── outstanding_work.hpp │ │ ├── prefer_only.hpp │ │ ├── receiver.hpp │ │ ├── receiver_invocation_error.hpp │ │ ├── relationship.hpp │ │ ├── schedule.hpp │ │ ├── scheduler.hpp │ │ ├── sender.hpp │ │ ├── set_done.hpp │ │ ├── set_error.hpp │ │ ├── set_value.hpp │ │ ├── start.hpp │ │ └── submit.hpp │ ├── execution_context.hpp │ ├── executor.hpp │ ├── executor_work_guard.hpp │ ├── experimental │ │ ├── append.hpp │ │ ├── as_single.hpp │ │ ├── as_tuple.hpp │ │ ├── awaitable_operators.hpp │ │ ├── basic_channel.hpp │ │ ├── basic_concurrent_channel.hpp │ │ ├── cancellation_condition.hpp │ │ ├── channel.hpp │ │ ├── channel_error.hpp │ │ ├── channel_traits.hpp │ │ ├── co_spawn.hpp │ │ ├── concurrent_channel.hpp │ │ ├── coro.hpp │ │ ├── coro_traits.hpp │ │ ├── deferred.hpp │ │ ├── detail │ │ │ ├── channel_handler.hpp │ │ │ ├── channel_message.hpp │ │ │ ├── channel_operation.hpp │ │ │ ├── channel_payload.hpp │ │ │ ├── channel_receive_op.hpp │ │ │ ├── channel_send_functions.hpp │ │ │ ├── channel_send_op.hpp │ │ │ ├── channel_service.hpp │ │ │ ├── completion_handler_erasure.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 │ │ ├── parallel_group.hpp │ │ ├── prepend.hpp │ │ ├── promise.hpp │ │ └── use_coro.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_alloc_hook.hpp │ ├── handler_continuation_hook.hpp │ ├── handler_invoke_hook.hpp │ ├── high_resolution_timer.hpp │ ├── impl │ │ ├── any_io_executor.ipp │ │ ├── append.hpp │ │ ├── as_tuple.hpp │ │ ├── awaitable.hpp │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── cancellation_signal.ipp │ │ ├── co_spawn.hpp │ │ ├── connect.hpp │ │ ├── connect_pipe.hpp │ │ ├── connect_pipe.ipp │ │ ├── defer.hpp │ │ ├── deferred.hpp │ │ ├── detached.hpp │ │ ├── dispatch.hpp │ │ ├── error.ipp │ │ ├── error_code.ipp │ │ ├── execution_context.hpp │ │ ├── execution_context.ipp │ │ ├── executor.hpp │ │ ├── executor.ipp │ │ ├── handler_alloc_hook.ipp │ │ ├── io_context.hpp │ │ ├── io_context.ipp │ │ ├── multiple_exceptions.ipp │ │ ├── post.hpp │ │ ├── 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 │ ├── io_service.hpp │ ├── io_service_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 │ │ └── 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 │ ├── 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 │ │ │ ├── rfc2818_verification.ipp │ │ │ └── src.hpp │ │ ├── rfc2818_verification.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_error.hpp │ ├── system_executor.hpp │ ├── system_timer.hpp │ ├── this_coro.hpp │ ├── thread.hpp │ ├── thread_pool.hpp │ ├── time_traits.hpp │ ├── traits │ │ ├── bulk_execute_free.hpp │ │ ├── bulk_execute_member.hpp │ │ ├── connect_free.hpp │ │ ├── connect_member.hpp │ │ ├── equality_comparable.hpp │ │ ├── execute_free.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 │ │ ├── schedule_free.hpp │ │ ├── schedule_member.hpp │ │ ├── set_done_free.hpp │ │ ├── set_done_member.hpp │ │ ├── set_error_free.hpp │ │ ├── set_error_member.hpp │ │ ├── set_value_free.hpp │ │ ├── set_value_member.hpp │ │ ├── start_free.hpp │ │ ├── start_member.hpp │ │ ├── static_query.hpp │ │ ├── static_require.hpp │ │ ├── static_require_concept.hpp │ │ ├── submit_free.hpp │ │ └── submit_member.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 ├── async_simple │ ├── Collect.h │ ├── Common.h │ ├── Executor.h │ ├── Future.h │ ├── FutureState.h │ ├── IOExecutor.h │ ├── LocalState.h │ ├── MoveWrapper.h │ ├── Promise.h │ ├── Traits.h │ ├── Try.h │ ├── Unit.h │ ├── coro │ │ ├── Collect.h │ │ ├── ConditionVariable.h │ │ ├── CountEvent.h │ │ ├── DetachedCoroutine.h │ │ ├── Dispatch.h │ │ ├── FutureAwaiter.h │ │ ├── Generator.h │ │ ├── Latch.h │ │ ├── Lazy.h │ │ ├── Mutex.h │ │ ├── PromiseAllocator.h │ │ ├── ResumeBySchedule.h │ │ ├── Semaphore.h │ │ ├── SharedMutex.h │ │ ├── Sleep.h │ │ ├── SpinLock.h │ │ ├── SyncAwait.h │ │ ├── Traits.h │ │ └── ViaCoroutine.h │ ├── executors │ │ ├── SimpleExecutor.h │ │ └── SimpleIOExecutor.h │ ├── experimental │ │ └── coroutine.h │ ├── uthread │ │ ├── Async.h │ │ ├── Await.h │ │ ├── Collect.h │ │ ├── Latch.h │ │ ├── Uthread.h │ │ └── internal │ │ │ ├── Darwin │ │ │ ├── arm64 │ │ │ │ ├── jump_arm64_aapcs_macho_gas.S │ │ │ │ ├── make_arm64_aapcs_macho_gas.S │ │ │ │ └── ontop_arm64_aapcs_macho_gas.S │ │ │ └── x86_64 │ │ │ │ ├── jump_x86_64_sysv_macho_gas.S │ │ │ │ ├── make_x86_64_sysv_macho_gas.S │ │ │ │ └── ontop_x86_64_sysv_macho_gas.S │ │ │ ├── Linux │ │ │ ├── aarch64 │ │ │ │ ├── jump_arm64_aapcs_elf_gas.S │ │ │ │ ├── make_arm64_aapcs_elf_gas.S │ │ │ │ └── ontop_arm64_aapcs_elf_gas.S │ │ │ ├── ppc64le │ │ │ │ ├── jump_ppc64_sysv_elf_gas.S │ │ │ │ ├── make_ppc64_sysv_elf_gas.S │ │ │ │ └── ontop_ppc64_sysv_elf_gas.S │ │ │ └── x86_64 │ │ │ │ ├── jump_x86_64_sysv_elf_gas.S │ │ │ │ ├── make_x86_64_sysv_elf_gas.S │ │ │ │ └── ontop_x86_64_sysv_elf_gas.S │ │ │ ├── thread.cc │ │ │ ├── thread.h │ │ │ └── thread_impl.h │ └── util │ │ ├── Condition.h │ │ ├── Queue.h │ │ ├── ThreadPool.h │ │ └── move_only_function.h ├── cinatra.hpp ├── cinatra │ ├── brzip.hpp │ ├── cinatra_log_wrapper.hpp │ ├── cookie.hpp │ ├── coro_http_client.hpp │ ├── coro_http_connection.hpp │ ├── coro_http_request.hpp │ ├── coro_http_response.hpp │ ├── coro_http_router.hpp │ ├── coro_http_server.hpp │ ├── coro_radix_tree.hpp │ ├── define.h │ ├── dh1024.pem │ ├── fake_server.crt │ ├── gzip.hpp │ ├── http_parser.hpp │ ├── io_service_pool.hpp │ ├── mime_types.hpp │ ├── multipart.hpp │ ├── picohttpparser.h │ ├── response_cv.hpp │ ├── server.crt │ ├── server.key │ ├── session.hpp │ ├── session_manager.hpp │ ├── sha1.hpp │ ├── smtp_client.hpp │ ├── string_resize.hpp │ ├── time_util.hpp │ ├── uri.hpp │ ├── url_encode_decode.hpp │ ├── use_asio.hpp │ ├── utils.hpp │ ├── version.hpp │ ├── websocket.hpp │ ├── ws_define.h │ └── ylt │ │ ├── coro_io │ │ ├── client_pool.hpp │ │ ├── coro_file.hpp │ │ ├── coro_io.hpp │ │ ├── detail │ │ │ └── client_queue.hpp │ │ ├── io_context_pool.hpp │ │ └── load_blancer.hpp │ │ ├── metric │ │ ├── counter.hpp │ │ ├── dynamic_metric.hpp │ │ ├── gauge.hpp │ │ ├── histogram.hpp │ │ ├── metric.hpp │ │ ├── metric_manager.hpp │ │ ├── summary.hpp │ │ ├── summary_impl.hpp │ │ ├── system_metric.hpp │ │ └── thread_local_value.hpp │ │ └── util │ │ ├── concurrentqueue.h │ │ ├── expected.hpp │ │ ├── map_sharded.hpp │ │ └── type_traits.h └── cmdline │ └── cmdline.h ├── lang ├── coro_http_client_introduction.md ├── coroutine_based_http_lib.md ├── english │ └── README.md ├── how_to_use_metrics.md ├── metrict_introduction.md ├── qps-comp.png ├── qps-pipeline.png └── qps.png ├── press_tool ├── CMakeLists.txt ├── config.h ├── main.cpp └── util.h └── tests ├── CMakeLists.txt ├── doctest └── doctest.h ├── files_for_test_time_parse ├── http_times.txt ├── utc_times.txt └── utc_without_punctuation_times.txt ├── main.cpp ├── test_cinatra.cpp ├── test_cinatra_websocket.cpp ├── test_cmdline.cpp ├── test_coro_http_server.cpp ├── test_corofile.cpp ├── test_http_parse.cpp ├── test_metric.cpp └── test_time_util.cpp /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | # Should be declared this way: 5 | BreakBeforeBraces: Custom 6 | BraceWrapping: 7 | BeforeElse: true 8 | AllowShortLambdasOnASingleLine: None 9 | AllowShortIfStatementsOnASingleLine: Never 10 | --- 11 | Language: JavaScript 12 | DisableFormat: true 13 | --- 14 | # Ignore json file 15 | Language: Json 16 | DisableFormat: true 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/clang-format.yml: -------------------------------------------------------------------------------- 1 | name: Clang Format Diff 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | - coro_http_server 9 | pull_request: 10 | branches: 11 | - main 12 | - master 13 | - coro_http_server 14 | 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v3 23 | with: 24 | fetch-depth: 0 25 | - name: install clang-format 26 | run: sudo apt install clang-format 27 | - name: check-diff 28 | run: | 29 | diff=`git-clang-format --diff HEAD^` 30 | if ! [[ "$diff" = "no modified files to format" || "$diff" = "clang-format did not modify any files" ]]; then 31 | echo "The diff you sent is not formatted correctly." 32 | echo "The suggested format is" 33 | echo "$diff" 34 | exit 1 35 | fi 36 | -------------------------------------------------------------------------------- /.github/workflows/code-coverage.yml: -------------------------------------------------------------------------------- 1 | name: Upload CodeCov Report 2 | 3 | on: [ push, pull_request ] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout Code 12 | uses: actions/checkout@v2 13 | with: 14 | fetch-depth: 2 15 | 16 | - name: Configure cmake 17 | run: cmake -B${{github.workspace}}/build -DCOVERAGE_TEST=ON -DENABLE_SSL=ON -DCINATRA_ENABLE_SSL=ON -DCMAKE_BUILD_TYPE=Debug 18 | 19 | - name: Build with ${{ matrix.compiler }} 20 | run: cmake --build ${{github.workspace}}/build --config Debug 21 | 22 | - name: Test 23 | working-directory: ${{github.workspace}}/build 24 | env: 25 | CTEST_OUTPUT_ON_FAILURE: 1 26 | run: ctest ${{ matrix.configuration }} -j `nproc` -V 27 | 28 | - name: Upload coverage to Codecov 29 | uses: codecov/codecov-action@v1 30 | -------------------------------------------------------------------------------- /.github/workflows/mac.yml: -------------------------------------------------------------------------------- 1 | name: macOS Monterey 12 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | - coro_http_server 9 | pull_request: 10 | branches: 11 | - main 12 | - master 13 | - coro_http_server 14 | 15 | jobs: 16 | build_on_mac: 17 | strategy: 18 | matrix: 19 | mode: [Debug, Release] 20 | ssl: [ON, OFF] 21 | 22 | runs-on: macos-latest 23 | 24 | steps: 25 | - name: Checkout 26 | uses: actions/checkout@master 27 | 28 | - name: SetUp HomeBrew 29 | id: set-up-homebrew 30 | uses: Homebrew/actions/setup-homebrew@master 31 | 32 | - name: Install Dependencies 33 | run: HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install openssl protobuf 34 | 35 | - name: Configure CMake 36 | run: OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 CXX=clang++ CC=clang cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} 37 | 38 | - name: Build 39 | run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} 40 | 41 | - name: Test 42 | working-directory: ${{github.workspace}}/build 43 | run: ctest -C ${{matrix.mode}} -j -V 44 | 45 | - name: Upload Artifact 46 | uses: actions/upload-artifact@v4 47 | if: failure() 48 | with: 49 | name: LastTest.log 50 | if-no-files-found: ignore 51 | path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log 52 | -------------------------------------------------------------------------------- /.github/workflows/windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows Server 2022 2 | 3 | on: 4 | push: 5 | branches: [ main, master, coro_http_server ] 6 | pull_request: 7 | branches: [ main, master, coro_http_server ] 8 | 9 | jobs: 10 | build_on_windows: 11 | runs-on: windows-latest 12 | 13 | strategy: 14 | matrix: 15 | mode: [ Debug ] #[ Release, Debug ] 16 | arch: [ amd64, x86 ] #[ amd64,x86 ] 17 | ssl: [ OFF ] #[ ON, OFF ] 18 | 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v3 22 | 23 | - name: Install ninja-build tool 24 | uses: seanmiddleditch/gha-setup-ninja@v3 25 | 26 | - name: Enable Developer Command Prompt 27 | uses: ilammy/msvc-dev-cmd@v1.12.0 28 | with: 29 | arch: ${{ matrix.arch }} 30 | 31 | - name: Configure CMake 32 | run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} -G Ninja -B ${{github.workspace}}/build 33 | 34 | - name: Build 35 | run: cmake --build ${{github.workspace}}/build --config ${{ matrix.mode }} 36 | 37 | - name: Test 38 | working-directory: ${{github.workspace}}/build 39 | run: ctest -C ${{matrix.mode}} -j 1 -V 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | # 35 | .idea 36 | cmake-* 37 | *build* 38 | .fleet 39 | .vs 40 | out 41 | .vscode 42 | .cache 43 | .coverage 44 | .coverage_lcov 45 | .coverage_llvm_cov 46 | doxygen-awesome-css 47 | html 48 | CMakeUserPresets.json 49 | .DS_Store 50 | node_modules 51 | /CMakeSettings.json 52 | !cmake/build.cmake 53 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "iguana"] 2 | path = iguana 3 | url = https://github.com/qicosmos/iguana.git 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: cpp 3 | dist: trusty 4 | 5 | git: 6 | depth: 5 7 | 8 | os: 9 | - linux 10 | 11 | compiler: 12 | - g++ 13 | - clang++ 14 | 15 | arch: 16 | packages: 17 | - cmake 18 | - gcc 19 | - clang 20 | 21 | script: 22 | - cd example 23 | - mkdir build && cd build 24 | - cmake .. -DCMAKE_BUILD_TYPE=Debug 25 | - make -j4 26 | 27 | script: 28 | - "curl -s https://raw.githubusercontent.com/Jackarain/arch-travis/master/arch-travis.sh | bash" 29 | 30 | # branches: 31 | # only: 32 | # - master 33 | 34 | notifications: 35 | recipients: [] 36 | email: 37 | on_success: change 38 | on_failure: always -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(cinatra) 3 | 4 | include_directories(include) 5 | 6 | #the thread library of the system. 7 | find_package(Threads REQUIRED) 8 | 9 | include(cmake/find_openssl.cmake) 10 | include(cmake/build.cmake) 11 | include(cmake/develop.cmake) 12 | 13 | if (BUILD_UNIT_TESTS) 14 | add_subdirectory(${cinatra_SOURCE_DIR}/tests) 15 | endif () 16 | if (BUILD_EXAMPLES) 17 | add_subdirectory(${cinatra_SOURCE_DIR}/example) 18 | endif () 19 | if (BUILD_PRESS_TOOL) 20 | add_subdirectory(${cinatra_SOURCE_DIR}/press_tool) 21 | endif () -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 nanolog 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /cmake/FindBrotli.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_path(BROTLI_INCLUDE_DIR "brotli/decode.h") 4 | 5 | find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon) 6 | find_library(BROTLIDEC_LIBRARY NAMES brotlidec) 7 | find_library(BROTLIENC_LIBRARY NAMES brotlienc) 8 | 9 | find_package_handle_standard_args(Brotli 10 | FOUND_VAR 11 | BROTLI_FOUND 12 | REQUIRED_VARS 13 | BROTLIDEC_LIBRARY 14 | BROTLICOMMON_LIBRARY 15 | BROTLI_INCLUDE_DIR 16 | FAIL_MESSAGE 17 | "Could NOT find Brotli" 18 | ) 19 | 20 | set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR}) 21 | set(BROTLI_LIBRARIES ${BROTLIDEC_LIBRARY} ${BROTLIENC_LIBRARY} ${BROTLICOMMON_LIBRARY}) -------------------------------------------------------------------------------- /cmake/build.cmake: -------------------------------------------------------------------------------- 1 | # Compile Standard 2 | set(CMAKE_CXX_STANDARD 20) 3 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 4 | message(STATUS "CXX Standard: ${CMAKE_CXX_STANDARD}") 5 | 6 | # Build Type 7 | if(NOT CMAKE_BUILD_TYPE) 8 | set(CMAKE_BUILD_TYPE "Release") 9 | endif() 10 | message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") 11 | 12 | # libc++ or libstdc++&clang 13 | option(BUILD_WITH_LIBCXX "Build with libc++" OFF) 14 | message(STATUS "BUILD_WITH_LIBCXX: ${BUILD_WITH_LIBCXX}") 15 | if(BUILD_WITH_LIBCXX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") 17 | else() 18 | endif() 19 | 20 | if (MSVC) 21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest") 22 | else () 23 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pthread -std=c++20") 24 | endif () 25 | 26 | # --------------------- Gcc 27 | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 28 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines") 29 | #-ftree-slp-vectorize with coroutine cause link error. disable it util gcc fix. 30 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-slp-vectorize") 31 | endif() 32 | 33 | # --------------------- Msvc 34 | # Resolves C1128 complained by MSVC: number of sections exceeded object file format limit: compile with /bigobj. 35 | add_compile_options("$<$:/bigobj>") 36 | # Resolves C4737 complained by MSVC: C4737: Unable to perform required tail call. Performance may be degraded. "Release-Type only" 37 | add_compile_options("$<$:/EHa>") -------------------------------------------------------------------------------- /cmake/find_openssl.cmake: -------------------------------------------------------------------------------- 1 | check_library_exists(ssl SSL_new "" HAVE_SSL_LIB) 2 | if(HAVE_SSL_LIB) 3 | message(STATUS "Found OpenSSL libraries") 4 | set(ENABLE_SSL ON) 5 | else() 6 | message(STATUS "OpenSSL libraries not found") 7 | endif() 8 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | patch: off 4 | project: off 5 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="1072526820@qq.com" 3 | RUN apt-get update -yqq && \ 4 | apt-get install -yqq cmake git uuid-dev gcc g++ autoconf 5 | ENV ASIO=/asio 6 | ENV ASIO_INTERNAL=/asio/asio 7 | WORKDIR / 8 | RUN git clone https://github.com/chriskohlhoff/asio.git 9 | WORKDIR $ASIO 10 | RUN git checkout 8087252a0c3c2f0baad96ddbd6554db17a846376 11 | WORKDIR $ASIO_INTERNAL 12 | RUN ./autogen.sh && ./configure 13 | RUN make && make install 14 | ENV CINATRA=/cinatra 15 | WORKDIR $CINATRA 16 | RUN git clone https://github.com/qicosmos/cinatra.git 17 | RUN cd /cinatra/cinatra/example && \ 18 | mkdir build && cd build && cmake -DLINUX=True ../ && make 19 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | # 如何使用 2 | 3 | ## cinatra需要的编译器版本: 4 | 5 | 1. C++20 编译器 (gcc 10.2, clang 13, Visual Studio 2022,或者更高的版本) 6 | 7 | ## 使用docker进行开发部署,省去部分烦恼。 8 | 9 | ``` 10 | git clone https://github.com/qicosmos/cinatra.git 11 | cd cinatra/docker 12 | docker build -t cinatra_env . 13 | docker run -it cinatra_env 14 | 15 | ``` 16 | 17 | ## 使用 18 | cinatra是header-only的,直接引用头文件既可。 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/benchmark.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace cinatra; 4 | using namespace std::chrono_literals; 5 | 6 | int main() { 7 | coro_http_server server(std::thread::hardware_concurrency(), 8090, "0.0.0.0", 8 | true); 9 | server.set_http_handler( 10 | "/plaintext", [](coro_http_request& req, coro_http_response& resp) { 11 | resp.set_delay(false); 12 | resp.need_date_head(false); 13 | resp.set_status_and_content(status_type::ok, "Hello, world!"); 14 | }); 15 | server.sync_start(); 16 | } 17 | -------------------------------------------------------------------------------- /example/www/header/header.html: -------------------------------------------------------------------------------- 1 |
{{header_text}}
2 | -------------------------------------------------------------------------------- /example/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | New iView client 9 | 10 | 11 | 12 |

vue + iView test

13 | 14 |
15 | 37 |
38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /example/www/main.js: -------------------------------------------------------------------------------- 1 | /// UI 2 | import Vue from 'vue'; 3 | import iView from 'iview'; 4 | //import 'lib/iview/dist/styles/iview.css'; 5 | //import App from './App.vue'; 6 | 7 | //Vue.use(iView); 8 | 9 | Vue.use(iView, { 10 | transfer: true, 11 | size: 'large', 12 | select: { 13 | arrow: 'md-arrow-dropdown', 14 | arrowSize: 20 15 | } 16 | }); 17 | 18 | //$(window).load(function () { 19 | // if(false)//集成版 20 | // { 21 | 22 | // } 23 | // else//网页版 24 | // { 25 | 26 | // } 27 | //}); 28 | 29 | //$(document).ready(function () { 30 | // console.log("document ready"); 31 | /*始终最大化 32 | $("#maximize").click(function() { 33 | console.log("maximize toggled"); 34 | if (typeof window.toggleMaximize == "function") { 35 | window.toggleMaximize(); 36 | } 37 | });*/ 38 | // const aaa = "haha"; 39 | // const tem = `${aaa} lalala`; 40 | // console.log(tem) 41 | 42 | //const aside = document.getElementById("control_panel"); 43 | //function setMainLayout()//采用左右布局,动态设置地图大小 44 | //{ 45 | // if(aside.style !== "none") 46 | // { 47 | // const page_hight = document.documentElement.clientWidth;//获取页面可见高度 48 | // const width = page_hight - aside.clientWidth 49 | // document.getElementById("map_canvas").style.width= width+"px"; 50 | // console.log("map_canvas"); 51 | // } 52 | //} 53 | //window.onresize=setMainLayout; 54 | //setMainLayout(); 55 | //const mapContextMenuDiv = document.getElementById('map_context_menu'); 56 | //const markerContextMenuDiv = document.getElementById('marker_context_menu'); 57 | //}); -------------------------------------------------------------------------------- /example/www/test.css: -------------------------------------------------------------------------------- 1 | .abc 2 | { 3 | background:{{test_text}} 4 | opacity:{{number}} 5 | } 6 | -------------------------------------------------------------------------------- /example/www/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

${header_text}

8 |

${test_text}

9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /include/asio/associator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // associator.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2022 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 ASIO_ASSOCIATOR_HPP 12 | #define 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 "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Used to generically specialise associators for a type. 25 | template