20 #ifndef RIPPLE_OVERLAY_CONNECTATTEMPT_H_INCLUDED
21 #define RIPPLE_OVERLAY_CONNECTATTEMPT_H_INCLUDED
23 #include <ripple/overlay/impl/OverlayImpl.h>
24 #include <ripple/overlay/impl/Tuning.h>
38 boost::beast::http::request<boost::beast::http::empty_body>;
41 boost::beast::http::response<boost::beast::http::dynamic_body>;
55 boost::asio::basic_waitable_timer<std::chrono::steady_clock>
timer_;
67 boost::asio::io_service& io_service,
110 template <
class =
void>
111 static boost::asio::ip::tcp::endpoint
119 ec = boost::system::errc::make_error_code(
120 boost::system::errc::invalid_argument);
121 return boost::asio::ip::tcp::endpoint{};
void onHandshake(error_code ec)
endpoint_type remote_endpoint_
boost::asio::io_service::strand strand_
boost::beast::http::response< boost::beast::http::dynamic_body > response_type
const beast::Journal journal_
boost::beast::http::request< boost::beast::http::empty_body > request_type
boost::asio::ip::tcp::socket socket_type
void onRead(error_code ec)
std::shared_ptr< PeerFinder::Slot > slot_
boost::system::error_code error_code
void onShutdown(error_code ec)
boost::beast::tcp_stream middle_type
Resource::Consumer usage_
A generic endpoint for log messages.
Manages an outbound connection attempt.
boost::asio::ip::tcp::endpoint endpoint_type
void fail(std::string const &reason)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::beast::ssl_stream< middle_type > stream_type
std::unique_ptr< stream_type > stream_ptr_
An endpoint that consumes resources.
boost::asio::basic_waitable_timer< std::chrono::steady_clock > timer_
void onConnect(error_code ec)
Wraps a Journal::Sink to prefix its output with a string.
A version-independent IP address and port combination.
static boost::asio::ip::tcp::endpoint to_asio_endpoint(IP::Endpoint const &address)
ConnectAttempt(Application &app, boost::asio::io_service &io_service, endpoint_type const &remote_endpoint, Resource::Consumer usage, shared_context const &context, std::uint32_t id, std::shared_ptr< PeerFinder::Slot > const &slot, beast::Journal journal, OverlayImpl &overlay)
static boost::asio::ip::tcp::endpoint parse_endpoint(std::string const &s, boost::system::error_code &ec)
boost::beast::multi_buffer read_buf_
void onTimer(error_code ec)
void onWrite(error_code ec)