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:
Vinnie Falco
2014-03-07 20:06:12 -08:00
parent e3c1375f36
commit c2fd1215f5
161 changed files with 3141 additions and 3789 deletions

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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"