mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Changes for Beast version 59
This commit is contained in:
committed by
Miguel Portilla
parent
49bdf2e72d
commit
61316c7f95
@@ -22,7 +22,6 @@
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/basics/random.h>
|
||||
#include <ripple/beast/core/CurrentThreadName.h>
|
||||
#include <beast/core/placeholders.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <cmath>
|
||||
@@ -164,12 +163,12 @@ public:
|
||||
socket_.async_receive_from (buffer (buf_, 256),
|
||||
ep_, std::bind(
|
||||
&SNTPClientImp::onRead, this,
|
||||
beast::asio::placeholders::error,
|
||||
beast::asio::placeholders::bytes_transferred));
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
timer_.expires_from_now(NTP_QUERY_FREQUENCY);
|
||||
timer_.async_wait(std::bind(
|
||||
&SNTPClientImp::onTimer, this,
|
||||
beast::asio::placeholders::error));
|
||||
std::placeholders::_1));
|
||||
|
||||
// VFALCO Is it correct to launch the thread
|
||||
// here after queuing I/O?
|
||||
@@ -222,7 +221,7 @@ public:
|
||||
timer_.expires_from_now(NTP_QUERY_FREQUENCY);
|
||||
timer_.async_wait(std::bind(
|
||||
&SNTPClientImp::onTimer, this,
|
||||
beast::asio::placeholders::error));
|
||||
std::placeholders::_1));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -286,8 +285,8 @@ public:
|
||||
|
||||
socket_.async_receive_from(buffer(buf_, 256),
|
||||
ep_, std::bind(&SNTPClientImp::onRead, this,
|
||||
beast::asio::placeholders::error,
|
||||
beast::asio::placeholders::bytes_transferred));
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -339,8 +338,8 @@ public:
|
||||
boost::asio::ip::udp::v4 (), best->first, "ntp");
|
||||
resolver_.async_resolve (query, std::bind (
|
||||
&SNTPClientImp::resolveComplete, this,
|
||||
beast::asio::placeholders::error,
|
||||
beast::asio::placeholders::iterator));
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
JLOG(j_.trace()) <<
|
||||
"SNTPClock: Resolve pending for " << best->first;
|
||||
return true;
|
||||
@@ -396,8 +395,8 @@ public:
|
||||
reinterpret_cast<std::uint32_t*> (SNTPQueryData)[NTP_OFF_XMITTS_FRAC] = query.nonce;
|
||||
socket_.async_send_to(buffer(SNTPQueryData, 48),
|
||||
*sel, std::bind (&SNTPClientImp::onSend, this,
|
||||
beast::asio::placeholders::error,
|
||||
beast::asio::placeholders::bytes_transferred));
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user