diff --git a/src/cpp/ripple/AutoSocket.h b/src/cpp/ripple/AutoSocket.h index 1a3b6db7b..0b5dc2155 100644 --- a/src/cpp/ripple/AutoSocket.h +++ b/src/cpp/ripple/AutoSocket.h @@ -141,6 +141,16 @@ public: } + template + void async_write(basic_streambuf& buffers, Handler handler) + { + if (isSecure()) + boost::asio::async_write(*mSocket, buffers, handler); + else + boost::asio::async_write(PlainSocket(), buffers, handler); + } + + template void async_read(const Buf& buffers, Condition cond, Handler handler) {