mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove obsolete handler wrappers
This commit is contained in:
@@ -74,23 +74,23 @@ boost::system::error_code Socket::accept (Socket&, boost::system::error_code& ec
|
||||
return pure_virtual (ec);
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code))
|
||||
Socket::async_accept (Socket&, BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code))
|
||||
Socket::async_accept (Socket&, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
ErrorCall, void (boost::system::error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -111,41 +111,41 @@ std::size_t Socket::write_some (ConstBuffers const&, boost::system::error_code&
|
||||
return 0;
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t))
|
||||
Socket::async_read_some (MutableBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code, std::size_t))
|
||||
Socket::async_read_some (MutableBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
TransferCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
get_io_service ().post (boost::bind (BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
get_io_service ().post (boost::bind (BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t))
|
||||
Socket::async_write_some (ConstBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code, std::size_t))
|
||||
Socket::async_write_some (ConstBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
TransferCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -164,23 +164,23 @@ boost::system::error_code Socket::handshake (handshake_type, boost::system::erro
|
||||
return pure_virtual (ec);
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code))
|
||||
Socket::async_handshake (handshake_type, BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code))
|
||||
Socket::async_handshake (handshake_type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
ErrorCall, void (boost::system::error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -192,24 +192,24 @@ boost::system::error_code Socket::handshake (handshake_type,
|
||||
return pure_virtual (ec);
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (boost::system::error_code, std::size_t))
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code, std::size_t))
|
||||
Socket::async_handshake (handshake_type, ConstBuffers const&,
|
||||
BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
TransferCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler), ec, 0));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec, 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -220,23 +220,23 @@ boost::system::error_code Socket::shutdown (boost::system::error_code& ec)
|
||||
return pure_virtual (ec);
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (boost::system::error_code))
|
||||
Socket::async_shutdown (BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (boost::system::error_code))
|
||||
Socket::async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
ErrorCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
HandlerCall, void (boost::system::error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
return init.result.get();
|
||||
#else
|
||||
boost::system::error_code ec;
|
||||
ec = pure_virtual (ec);
|
||||
get_io_service ().post (boost::bind (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler), ec));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler), ec));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -169,13 +169,13 @@ public:
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler)
|
||||
{
|
||||
return async_accept (peer,
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(ErrorCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (HandlerCall::Accept (),
|
||||
BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(ErrorCall) handler);
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
@@ -210,13 +210,13 @@ public:
|
||||
async_read_some (MutableBufferSequence const& buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
|
||||
{
|
||||
return async_read_some (MutableBuffers (buffers),
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(TransferCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (HandlerCall::Transfer (),
|
||||
BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_read_some (MutableBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler);
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_read_some (MutableBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
|
||||
// AsyncWriteStream
|
||||
// http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/AsyncWriteStream.html
|
||||
@@ -225,13 +225,13 @@ public:
|
||||
async_write_some (ConstBufferSequence const& buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
|
||||
{
|
||||
return async_write_some (ConstBuffers (buffers),
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(TransferCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (HandlerCall::Transfer (),
|
||||
BOOST_ASIO_MOVE_CAST(WriteHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler);
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
@@ -275,13 +275,13 @@ public:
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler)
|
||||
{
|
||||
return async_handshake (type,
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(ErrorCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (HandlerCall::Error (),
|
||||
BOOST_ASIO_MOVE_CAST(HandshakeHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(ErrorCall) handler);
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -318,14 +318,14 @@ public:
|
||||
BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler)
|
||||
{
|
||||
return async_handshake (type, ConstBuffers (buffers),
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(TransferCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (
|
||||
BOOST_ASIO_MOVE_CAST(BufferedHandshakeHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type type, ConstBuffers const& buffers,
|
||||
BOOST_ASIO_MOVE_ARG(TransferCall) handler);
|
||||
BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -348,13 +348,13 @@ public:
|
||||
void async_shutdown (BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler)
|
||||
{
|
||||
return async_shutdown (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(ErrorCall (
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(HandlerCall (HandlerCall::Error (),
|
||||
BOOST_ASIO_MOVE_CAST(ShutdownHandler)(handler))));
|
||||
}
|
||||
|
||||
virtual
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(ErrorCall) handler);
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -363,19 +363,19 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
typedef typename native_socket <this_layer_type>::socket_type socket_type;
|
||||
return async_accept (peer, BOOST_ASIO_MOVE_CAST(ErrorCall)(handler),
|
||||
return async_accept (peer, BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_accept <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
(socket_type&, BOOST_ASIO_MOVE_ARG(TransferCall))>::value> ());
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
(socket_type&, BOOST_ASIO_MOVE_ARG(HandlerCall))>::value> ());
|
||||
}
|
||||
|
||||
template <typename AcceptHandler>
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE(ErrorCall, void (error_code))
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE(HandlerCall, void (error_code))
|
||||
async_accept (Socket& peer, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler,
|
||||
boost::true_type)
|
||||
{
|
||||
@@ -395,12 +395,12 @@ public:
|
||||
AcceptHandler, void (error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
AcceptHandler (init.handler), pure_virtual_error ()));
|
||||
return init.result.get();
|
||||
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(AcceptHandler)(handler),
|
||||
pure_virtual_error ()));
|
||||
|
||||
@@ -462,14 +462,14 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_read_some (MutableBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_read_some (MutableBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
return async_read_some (buffers, BOOST_ASIO_MOVE_CAST(TransferCall)(handler),
|
||||
return async_read_some (buffers, BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_read_some <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
(MutableBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall))>::value> ());
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
(MutableBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall))>::value> ());
|
||||
}
|
||||
|
||||
template <typename MutableBufferSequence, typename ReadHandler>
|
||||
@@ -491,12 +491,12 @@ public:
|
||||
ReadHandler, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
ReadHandler (init.handler), pure_virtual_error (), 0));
|
||||
return init.result.get();
|
||||
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(ReadHandler)(handler),
|
||||
pure_virtual_error (), 0));
|
||||
|
||||
@@ -505,40 +505,40 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
return async_write_some (buffers, BOOST_ASIO_MOVE_CAST(TransferCall)(handler),
|
||||
return async_write_some (buffers, BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_write_some <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
(ConstBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall))>::value> ());
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
(ConstBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall))>::value> ());
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::true_type)
|
||||
{
|
||||
return m_object.async_write_some (buffers,
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_write_some (ConstBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::false_type)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
TransferCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
HandlerCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
TransferCall (init.handler), pure_virtual_error (), 0));
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
HandlerCall (init.handler), pure_virtual_error (), 0));
|
||||
return init.result.get();
|
||||
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler),
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
pure_virtual_error (), 0));
|
||||
|
||||
#endif
|
||||
@@ -556,8 +556,8 @@ public:
|
||||
has_handshake <this_layer_type,
|
||||
error_code (handshake_type, error_code&)>::value ||
|
||||
has_async_handshake <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
(handshake_type, BOOST_ASIO_MOVE_ARG(ErrorCall))>::value;
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
(handshake_type, BOOST_ASIO_MOVE_ARG(HandlerCall))>::value;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -584,39 +584,39 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
return async_handshake (type, BOOST_ASIO_MOVE_CAST(ErrorCall)(handler),
|
||||
return async_handshake (type, BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_handshake <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
(handshake_type, BOOST_ASIO_MOVE_ARG(ErrorCall))>::value> ());
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
(handshake_type, BOOST_ASIO_MOVE_ARG(HandlerCall))>::value> ());
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(ErrorCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::true_type)
|
||||
{
|
||||
return m_object.async_handshake (type,
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_handshake (handshake_type, BOOST_ASIO_MOVE_ARG(ErrorCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_handshake (handshake_type, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::false_type)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
ErrorCall, void (error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
HandlerCall, void (error_code)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
ErrorCall (init.handler), pure_virtual_error ()));
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
HandlerCall (init.handler), pure_virtual_error ()));
|
||||
return init.result.get();
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler),
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
pure_virtual_error ()));
|
||||
#endif
|
||||
}
|
||||
@@ -647,41 +647,41 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type type, ConstBuffers const& buffers,
|
||||
BOOST_ASIO_MOVE_ARG(TransferCall) handler)
|
||||
BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
return async_handshake (type, buffers, BOOST_ASIO_MOVE_CAST(TransferCall)(handler),
|
||||
return async_handshake (type, buffers, BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_handshake <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
(handshake_type, ConstBuffers const&, error_code&)>::value> ());
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type type, ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(TransferCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type type, ConstBuffers const& buffers, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::true_type)
|
||||
{
|
||||
return m_object.async_handshake (type, buffers,
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(TransferCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type, ConstBuffers const&, BOOST_ASIO_MOVE_ARG(TransferCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code, std::size_t))
|
||||
async_handshake (handshake_type, ConstBuffers const&, BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::false_type)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
TransferCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler));
|
||||
HandlerCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
TransferCall (init.handler), pure_virtual_error (), 0));
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
HandlerCall (init.handler), pure_virtual_error (), 0));
|
||||
return init.result.get();
|
||||
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
BOOST_ASIO_MOVE_CAST(TransferCall)(handler),
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
pure_virtual_error (), 0));
|
||||
|
||||
#endif
|
||||
@@ -713,39 +713,39 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void async_shutdown (BOOST_ASIO_MOVE_ARG(ErrorCall) handler)
|
||||
void async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler)
|
||||
{
|
||||
using namespace SocketWrapperMemberChecks;
|
||||
return async_shutdown (BOOST_ASIO_MOVE_CAST(ErrorCall)(handler),
|
||||
return async_shutdown (BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
EnableIf <has_async_shutdown <this_layer_type,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
(BOOST_ASIO_MOVE_ARG(ErrorCall))>::value> ());
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
(BOOST_ASIO_MOVE_ARG(HandlerCall))>::value> ());
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(ErrorCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::true_type)
|
||||
{
|
||||
return m_object.async_shutdown (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
}
|
||||
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(ErrorCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(ErrorCall) handler,
|
||||
BEAST_ASIO_INITFN_RESULT_TYPE_MEMBER(HandlerCall, void (error_code))
|
||||
async_shutdown (BOOST_ASIO_MOVE_ARG(HandlerCall) handler,
|
||||
boost::false_type)
|
||||
{
|
||||
#if BEAST_ASIO_HAS_FUTURE_RETURNS
|
||||
boost::asio::detail::async_result_init<
|
||||
ErrorCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler));
|
||||
HandlerCall, void (error_code, std::size_t)> init(
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler));
|
||||
// init.handler is copied
|
||||
get_io_service ().post (CompletionCall (
|
||||
ErrorCall (init.handler), pure_virtual_error ()));
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
HandlerCall (init.handler), pure_virtual_error ()));
|
||||
return init.result.get();
|
||||
|
||||
#else
|
||||
get_io_service ().post (CompletionCall (
|
||||
BOOST_ASIO_MOVE_CAST(ErrorCall)(handler),
|
||||
get_io_service ().post (HandlerCall (HandlerCall::Post (),
|
||||
BOOST_ASIO_MOVE_CAST(HandlerCall)(handler),
|
||||
pure_virtual_error ()));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user