diff --git a/include/bitcoin/network/net/acceptor.hpp b/include/bitcoin/network/net/acceptor.hpp index 5d5f8bc59..6e4eb4cc2 100644 --- a/include/bitcoin/network/net/acceptor.hpp +++ b/include/bitcoin/network/net/acceptor.hpp @@ -43,8 +43,8 @@ class BCT_API acceptor DELETE_COPY_MOVE(acceptor); - // Construct. - // ------------------------------------------------------------------------ + /// Construct. + /// ----------------------------------------------------------------------- /// Construct an instance. acceptor(const logger& log, asio::strand& strand, asio::io_context& service, @@ -53,8 +53,8 @@ class BCT_API acceptor /// Asserts/logs stopped. virtual ~acceptor() NOEXCEPT; - // Start/stop. - // ------------------------------------------------------------------------ + /// Start/stop. + /// ----------------------------------------------------------------------- /// Starts return operation_failed if not stopped. /// Start the listener on the specified ip address and port (call once). @@ -63,14 +63,14 @@ class BCT_API acceptor /// Cancel work (idempotent), handler signals completion. virtual void stop() NOEXCEPT; - // Properties. - // ------------------------------------------------------------------------ + /// Properties. + /// ----------------------------------------------------------------------- /// The local endpoint to which this acceptor is bound (requires strand). virtual config::authority local() const NOEXCEPT; - // Methods. - // ------------------------------------------------------------------------ + /// Methods. + /// ----------------------------------------------------------------------- /// Subsequent accepts may only be attempted following handler invocation. /// The socket parameter is nullptr unless success is returned. diff --git a/include/bitcoin/network/net/connector.hpp b/include/bitcoin/network/net/connector.hpp index 1e81a4110..69af2533a 100644 --- a/include/bitcoin/network/net/connector.hpp +++ b/include/bitcoin/network/net/connector.hpp @@ -46,8 +46,8 @@ class BCT_API connector DELETE_COPY_MOVE(connector); - // Construct. - // ------------------------------------------------------------------------ + /// Construct. + /// ----------------------------------------------------------------------- /// Construct an instance. connector(const logger& log, asio::strand& strand, @@ -57,14 +57,14 @@ class BCT_API connector /// Asserts/logs stopped. virtual ~connector() NOEXCEPT; - // Stop (no start). - // ------------------------------------------------------------------------ + /// Stop (no start). + /// ----------------------------------------------------------------------- /// Cancel work (idempotent), handler signals completion. virtual void stop() NOEXCEPT; - // Methods. - // ------------------------------------------------------------------------ + /// Methods. + /// ----------------------------------------------------------------------- /// Subsequent accepts may only be attempted following handler invocation. /// The socket parameter is nullptr unless success is returned. diff --git a/src/error.cpp b/src/error.cpp index 73cbfb2ba..156bfe543 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -395,8 +395,7 @@ code asio_to_error_code(const boost_code& ec) NOEXCEPT // includes json codes code http_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::beast::http:: - make_error_code(http_error_t::end_of_stream).category(); + static boost::beast::http::detail::http_error_category category{}; if (!ec) return error::success; @@ -439,8 +438,7 @@ code http_to_error_code(const boost_code& ec) NOEXCEPT // includes json codes code ws_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::beast::websocket:: - make_error_code(ws_error_t::closed).category(); + static boost::beast::websocket::detail::error_codes category{}; if (!ec) return error::success; @@ -487,8 +485,7 @@ code ws_to_error_code(const boost_code& ec) NOEXCEPT code json_to_error_code(const boost_code& ec) NOEXCEPT { - static const auto& category = boost::json:: - make_error_code(json_error_t::syntax).category(); + static boost::json::detail::error_code_category_t category{}; if (!ec) return error::success;