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 committed 2014-03-14 08:03:48 -07:00
1 parent 5478c540cb
commit 6546c30e17
88 files changed
+2709 -3378

No files matched your search

@@ -17,7 +17,10 @@
*/
//==============================================================================
TestPeerLogicAsyncClient::TestPeerLogicAsyncClient (Socket& socket)
namespace beast {
namespace asio {
TestPeerLogicAsyncClient::TestPeerLogicAsyncClient (abstract_socket& socket)
: TestPeerLogic (socket)
{
}
@@ -39,7 +42,7 @@ void TestPeerLogicAsyncClient::on_connect_async (error_code const& ec)
if (socket ().needs_handshake ())
{
socket ().async_handshake (Socket::client,
socket ().async_handshake (abstract_socket::client,
boost::bind (&TestPeerLogicAsyncClient::on_handshake, this,
boost::asio::placeholders::error));
}
@@ -108,7 +111,7 @@ void TestPeerLogicAsyncClient::on_read_final (error_code const& ec, std::size_t)
{
// on_shutdown will call finished ()
error_code ec;
on_shutdown (socket ().shutdown (Socket::shutdown_send, ec));
on_shutdown (socket ().shutdown (abstract_socket::shutdown_send, ec));
}
}
else
@@ -137,7 +140,7 @@ void TestPeerLogicAsyncClient::on_shutdown (error_code const& ec)
{
if (socket ().needs_handshake ())
{
socket ().shutdown (Socket::shutdown_send, error ());
socket ().shutdown (abstract_socket::shutdown_send, error ());
}
if (! error ())
@@ -153,3 +156,6 @@ void TestPeerLogicAsyncClient::on_shutdown (error_code const& ec)
finished ();
}
}
}