|
rippled
|
Provides an asynchronous HTTPS file downloader. More...


Public Types | |
| using | error_code = boost::system::error_code |
Public Member Functions | |
| SSLHTTPDownloader (boost::asio::io_service &io_service, beast::Journal j, Config const &config, bool isPaused=false) | |
| bool | download (std::string const &host, std::string const &port, std::string const &target, int version, boost::filesystem::path const &dstPath, std::function< void(boost::filesystem::path)> complete) |
| void | onStop () |
| virtual | ~SSLHTTPDownloader ()=default |
| T | shared_from_this (T... args) |
| T | weak_from_this (T... args) |
Protected Types | |
| using | parser = boost::beast::http::basic_parser< false > |
Protected Member Functions | |
| bool | fail (boost::filesystem::path dstPath, std::function< void(boost::filesystem::path)> const &complete, boost::system::error_code const &ec, std::string const &errMsg, std::shared_ptr< parser > parser=nullptr) |
Protected Attributes | |
| const beast::Journal | j_ |
Private Member Functions | |
| void | do_session (std::string host, std::string port, std::string target, int version, boost::filesystem::path dstPath, std::function< void(boost::filesystem::path)> complete, boost::asio::yield_context yield) |
| virtual std::shared_ptr< parser > | getParser (boost::filesystem::path dstPath, std::function< void(boost::filesystem::path)> complete, boost::system::error_code &ec)=0 |
| virtual bool | checkPath (boost::filesystem::path const &dstPath)=0 |
| virtual void | closeBody (std::shared_ptr< parser > p)=0 |
| virtual uint64_t | size (std::shared_ptr< parser > p)=0 |
Private Attributes | |
| HTTPClientSSLContext | ssl_ctx_ |
| boost::asio::io_service::strand | strand_ |
| boost::optional< boost::asio::ssl::stream< boost::asio::ip::tcp::socket > > | stream_ |
| boost::beast::flat_buffer | read_buf_ |
| std::atomic< bool > | isStopped_ |
| bool | sessionActive_ |
| std::mutex | m_ |
| std::condition_variable | c_ |
Provides an asynchronous HTTPS file downloader.
Definition at line 44 of file SSLHTTPDownloader.h.
| using ripple::SSLHTTPDownloader::error_code = boost::system::error_code |
Definition at line 47 of file SSLHTTPDownloader.h.
|
protected |
Definition at line 70 of file SSLHTTPDownloader.h.
| ripple::SSLHTTPDownloader::SSLHTTPDownloader | ( | boost::asio::io_service & | io_service, |
| beast::Journal | j, | ||
| Config const & | config, | ||
| bool | isPaused = false |
||
| ) |
Definition at line 25 of file SSLHTTPDownloader.cpp.
|
virtualdefault |
| bool ripple::SSLHTTPDownloader::download | ( | std::string const & | host, |
| std::string const & | port, | ||
| std::string const & | target, | ||
| int | version, | ||
| boost::filesystem::path const & | dstPath, | ||
| std::function< void(boost::filesystem::path)> | complete | ||
| ) |
Definition at line 39 of file SSLHTTPDownloader.cpp.
| void ripple::SSLHTTPDownloader::onStop | ( | ) |
Definition at line 77 of file SSLHTTPDownloader.cpp.
|
protected |
Definition at line 340 of file SSLHTTPDownloader.cpp.
|
private |
Definition at line 91 of file SSLHTTPDownloader.cpp.
|
privatepure virtual |
Implemented in ripple::DatabaseDownloader.
|
privatepure virtual |
Implemented in ripple::DatabaseDownloader.
|
privatepure virtual |
Implemented in ripple::DatabaseDownloader.
|
privatepure virtual |
Implemented in ripple::DatabaseDownloader.
|
protected |
Definition at line 72 of file SSLHTTPDownloader.h.
|
private |
Definition at line 83 of file SSLHTTPDownloader.h.
|
private |
Definition at line 84 of file SSLHTTPDownloader.h.
|
private |
Definition at line 86 of file SSLHTTPDownloader.h.
|
private |
Definition at line 87 of file SSLHTTPDownloader.h.
|
private |
Definition at line 88 of file SSLHTTPDownloader.h.
|
private |
Definition at line 89 of file SSLHTTPDownloader.h.
|
private |
Definition at line 90 of file SSLHTTPDownloader.h.
|
private |
Definition at line 91 of file SSLHTTPDownloader.h.
1.8.17