rippled
|
Classes | |
struct | Query |
Public Types | |
using | error_code = boost::system::error_code |
using | rep = typename std::chrono::system_clock ::rep |
using | period = typename std::chrono::system_clock ::period |
using | duration = typename std::chrono::system_clock ::duration |
using | time_point = typename std::chrono::system_clock ::time_point |
using | clock_type = std::chrono::system_clock |
Public Member Functions | |
SNTPClientImp (beast::Journal j) | |
~SNTPClientImp () override | |
void | run (const std::vector< std::string > &servers) override |
time_point | now () const override |
duration | offset () const override |
void | doRun () |
void | onTimer (error_code const &ec) |
void | onRead (error_code const &ec, std::size_t bytes_xferd) |
void | addServer (std::string const &server) |
void | queryAll () |
bool | doQuery () |
void | resolveComplete (error_code const &ec, boost::asio::ip::udp::resolver::iterator it) |
void | onSend (error_code const &ec, std::size_t) |
void | processReply () |
virtual time_point | now () const=0 |
Returns the current time. More... | |
Static Public Attributes | |
static const bool | is_steady |
Private Types | |
template<class Duration > | |
using | sys_time = std::chrono::time_point< clock_type, Duration > |
using | sys_seconds = sys_time< std::chrono::seconds > |
Private Attributes | |
const beast::Journal | j_ |
std::mutex | mutex_ |
std::thread | thread_ |
boost::asio::io_service | io_service_ |
std::optional< boost::asio::io_service::work > | work_ |
std::map< boost::asio::ip::udp::endpoint, Query > | queries_ |
boost::asio::ip::udp::socket | socket_ |
boost::asio::basic_waitable_timer< std::chrono::system_clock > | timer_ |
boost::asio::ip::udp::resolver | resolver_ |
std::vector< std::pair< std::string, sys_seconds > > | servers_ |
std::chrono::seconds | offset_ |
sys_seconds | lastUpdate_ |
std::deque< std::chrono::seconds > | offsets_ |
std::vector< uint8_t > | buf_ |
boost::asio::ip::udp::endpoint | ep_ |
Definition at line 69 of file SNTPClock.cpp.
|
private |
Definition at line 73 of file SNTPClock.cpp.
|
private |
Definition at line 75 of file SNTPClock.cpp.
using ripple::SNTPClientImp::error_code = boost::system::error_code |
Definition at line 107 of file SNTPClock.cpp.
|
inherited |
Definition at line 60 of file abstract_clock.h.
|
inherited |
Definition at line 61 of file abstract_clock.h.
|
inherited |
Definition at line 62 of file abstract_clock.h.
|
inherited |
Definition at line 63 of file abstract_clock.h.
|
inherited |
Definition at line 64 of file abstract_clock.h.
|
explicit |
Definition at line 109 of file SNTPClock.cpp.
|
override |
Definition at line 121 of file SNTPClock.cpp.
|
overridevirtual |
Implements ripple::SNTPClock.
Definition at line 136 of file SNTPClock.cpp.
|
override |
Definition at line 172 of file SNTPClock.cpp.
|
overridevirtual |
Implements ripple::SNTPClock.
Definition at line 185 of file SNTPClock.cpp.
void ripple::SNTPClientImp::doRun | ( | ) |
Definition at line 194 of file SNTPClock.cpp.
void ripple::SNTPClientImp::onTimer | ( | error_code const & | ec | ) |
Definition at line 201 of file SNTPClock.cpp.
void ripple::SNTPClientImp::onRead | ( | error_code const & | ec, |
std::size_t | bytes_xferd | ||
) |
Definition at line 219 of file SNTPClock.cpp.
void ripple::SNTPClientImp::addServer | ( | std::string const & | server | ) |
Definition at line 287 of file SNTPClock.cpp.
void ripple::SNTPClientImp::queryAll | ( | ) |
Definition at line 294 of file SNTPClock.cpp.
bool ripple::SNTPClientImp::doQuery | ( | ) |
Definition at line 302 of file SNTPClock.cpp.
void ripple::SNTPClientImp::resolveComplete | ( | error_code const & | ec, |
boost::asio::ip::udp::resolver::iterator | it | ||
) |
Definition at line 344 of file SNTPClock.cpp.
void ripple::SNTPClientImp::onSend | ( | error_code const & | ec, |
std::size_t | |||
) |
Definition at line 410 of file SNTPClock.cpp.
void ripple::SNTPClientImp::processReply | ( | ) |
Definition at line 423 of file SNTPClock.cpp.
|
pure virtualinherited |
Returns the current time.
|
private |
Definition at line 89 of file SNTPClock.cpp.
|
mutableprivate |
Definition at line 90 of file SNTPClock.cpp.
|
private |
Definition at line 91 of file SNTPClock.cpp.
|
private |
Definition at line 92 of file SNTPClock.cpp.
|
private |
Definition at line 93 of file SNTPClock.cpp.
Definition at line 95 of file SNTPClock.cpp.
|
private |
Definition at line 96 of file SNTPClock.cpp.
|
private |
Definition at line 97 of file SNTPClock.cpp.
|
private |
Definition at line 98 of file SNTPClock.cpp.
|
private |
Definition at line 99 of file SNTPClock.cpp.
|
private |
Definition at line 100 of file SNTPClock.cpp.
|
private |
Definition at line 101 of file SNTPClock.cpp.
|
private |
Definition at line 102 of file SNTPClock.cpp.
|
private |
Definition at line 103 of file SNTPClock.cpp.
|
private |
Definition at line 104 of file SNTPClock.cpp.
|
staticinherited |
Definition at line 66 of file abstract_clock.h.