/usr/include/boost/beast/core/detail
NameSizeModeActions
impl/-0755rm
allocator.hpp9450644editdlrm
async_base.hpp9010644editdlrm
base64.hpp19420644editdlrm
base64.ipp61700644editdlrm
bind_continuation.hpp35040644editdlrm
bind_default_executor.hpp32430644editdlrm
bind_handler.hpp109590644editdlrm
buffer.hpp18250644editdlrm
buffers_pair.hpp26360644editdlrm
buffers_range_adaptor.hpp26510644editdlrm
buffers_ref.hpp16480644editdlrm
buffer_traits.hpp20950644editdlrm
chacha.hpp41670644editdlrm
char_buffer.hpp14070644editdlrm
clamp.hpp12290644editdlrm
config.hpp28840644editdlrm
cpu_info.hpp17870644editdlrm
flat_stream.hpp19190644editdlrm
get_io_context.hpp23380644editdlrm
is_invocable.hpp18880644editdlrm
ostream.hpp70040644editdlrm
pcg.hpp14640644editdlrm
read.hpp92170644editdlrm
remap_post_to_defer.hpp21520644editdlrm
service_base.hpp8500644editdlrm
sha1.hpp16240644editdlrm
sha1.ipp79980644editdlrm
static_const.hpp11540644editdlrm
static_ostream.hpp30300644editdlrm
static_string.hpp30300644editdlrm
stream_base.hpp26850644editdlrm
stream_traits.hpp27960644editdlrm
string.hpp8980644editdlrm
temporary_buffer.hpp16110644editdlrm
tuple.hpp21940644editdlrm
type_traits.hpp27790644editdlrm
variant.hpp48890644editdlrm
varint.hpp17120644editdlrm
win32_unicode_path.hpp21480644editdlrm
work_guard.hpp18510644editdlrm
Edit: /usr/include/boost/beast/core/detail/stream_base.hpp (2685B)
// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/boostorg/beast // #ifndef BOOST_BEAST_CORE_DETAIL_STREAM_BASE_HPP #define BOOST_BEAST_CORE_DETAIL_STREAM_BASE_HPP #include #include #include #include #include #include namespace boost { namespace beast { namespace detail { struct any_endpoint { template bool operator()( Error const&, Endpoint const&) const noexcept { return true; } }; struct stream_base { using clock_type = std::chrono::steady_clock; using time_point = typename std::chrono::steady_clock::time_point; using tick_type = std::uint64_t; struct op_state { net::steady_timer timer; // for timing out tick_type tick = 0; // counts waits bool pending = false; // if op is pending bool timeout = false; // if timed out template explicit op_state(Args&&... args) : timer(std::forward(args)...) { } }; class pending_guard { bool& b_; bool clear_ = true; public: ~pending_guard() { if(clear_) b_ = false; } explicit pending_guard(bool& b) : b_(b) { // If this assert goes off, it means you are attempting // to issue two of the same asynchronous I/O operation // at the same time, without waiting for the first one // to complete. For example, attempting two simultaneous // calls to async_read_some. Only one pending call of // each I/O type (read and write) is permitted. // BOOST_ASSERT(! b_); b_ = true; } pending_guard( pending_guard&& other) noexcept : b_(other.b_) , clear_(boost::exchange( other.clear_, false)) { } void reset() { BOOST_ASSERT(clear_); b_ = false; clear_ = false; } }; static time_point never() noexcept { return (time_point::max)(); } static std::size_t constexpr no_limit = (std::numeric_limits::max)(); }; } // detail } // beast } // boost #endif