mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refactor beast::asio:
* New tools for completion handlers: - wrap_handler provides composed io_service execution guarantees. - bind_handler rebinds arguments to handlers. - shared_handler type-erases any completion handler. - buffer_sequence type-erases templated BufferSequences - abstract_socket replaces Socket - socket_wrapper replaces SocketWrapper - beast::asio placeholders to work with std::bind * Removed obsolete classes and functions - AbstractHandler - ComposedAsyncOperation - SharedFunction - SharedHandler - SharedHandlerAllocator - SharedHandlerPtr - SharedHandlerType - SocketBase - SocketWrapperStrand - wrapHandler * Refactored classes to use new tools - abstract_socket - socket_wrapper - HandshakeDetector - HttpClientType * Miscellanous tidying - socket classes moved to beast::asio namespace - beast asio files provide their own namespace declaration. - Fix IsCallPossible conflicting template parameter name - Use <boost/get_pointer.hpp> for C++11 compatibility. - Remove extraneous include path from build environment.
This commit is contained in:
@@ -54,7 +54,7 @@ JobType Job::getType () const
|
||||
|
||||
CancelCallback Job::getCancelCallback () const
|
||||
{
|
||||
bassert (! m_cancelCallback.empty());
|
||||
bassert (m_cancelCallback);
|
||||
return m_cancelCallback;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ Job::clock_type::time_point const& Job::queue_time () const
|
||||
|
||||
bool Job::shouldCancel () const
|
||||
{
|
||||
if (! m_cancelCallback.empty ())
|
||||
if (m_cancelCallback)
|
||||
return m_cancelCallback ();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "JobTypeInfo.h"
|
||||
#include "JobTypeData.h"
|
||||
|
||||
#include "../beast/beast/cxx14/memory.h"
|
||||
#include "beast/beast/chrono/chrono_util.h"
|
||||
#include "../../beast/beast/cxx14/memory.h"
|
||||
#include "../../beast/beast/chrono/chrono_util.h"
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h"
|
||||
#include "../beast/modules/beast_core/system/BeforeBoost.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "../ripple_basics/ripple_basics.h"
|
||||
#include "../ripple_data/ripple_data.h"
|
||||
|
||||
#include "beast/beast/http/URL.h" // for Config
|
||||
#include "beast/beast/Insight.h"
|
||||
#include "../beast/beast/http/URL.h" // for Config
|
||||
#include "../beast/beast/Insight.h"
|
||||
|
||||
#include "../ripple/resource/api/LegacyFees.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user