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:
@@ -26,7 +26,7 @@ namespace HTTP {
|
||||
/** A listening socket. */
|
||||
class Door
|
||||
: public SharedObject
|
||||
, public AsyncObject <Door>
|
||||
, public beast::asio::AsyncObject <Door>
|
||||
, public List <Door>::Node
|
||||
, public LeakChecked <Door>
|
||||
{
|
||||
|
||||
@@ -28,12 +28,12 @@ namespace ripple {
|
||||
namespace HTTP {
|
||||
|
||||
// Holds the copy of buffers being sent
|
||||
typedef SharedArg <std::string> SharedBuffer;
|
||||
typedef beast::asio::SharedArg <std::string> SharedBuffer;
|
||||
|
||||
/** Represents an active connection. */
|
||||
class Peer
|
||||
: public SharedObject
|
||||
, public AsyncObject <Peer>
|
||||
, public beast::asio::AsyncObject <Peer>
|
||||
, public Session
|
||||
, public List <Peer>::Node
|
||||
, public LeakChecked <Peer>
|
||||
@@ -229,8 +229,8 @@ public:
|
||||
|
||||
if (m_socket->needs_handshake ())
|
||||
{
|
||||
m_socket->async_handshake (Socket::server, m_strand.wrap (
|
||||
boost::bind (&Peer::handle_handshake, Ptr(this),
|
||||
m_socket->async_handshake (beast::asio::abstract_socket::server,
|
||||
m_strand.wrap (boost::bind (&Peer::handle_handshake, Ptr(this),
|
||||
boost::asio::placeholders::error,
|
||||
CompletionCounter (this))));
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ Port::Port (
|
||||
uint16 port_,
|
||||
IP::Endpoint const& addr_,
|
||||
Security security_,
|
||||
SSLContext* context_)
|
||||
beast::asio::SSLContext* context_)
|
||||
: port (port_)
|
||||
, addr (addr_)
|
||||
, security (security_)
|
||||
|
||||
Reference in New Issue
Block a user