diff --git a/src/cpp/ripple/AutoSocket.h b/src/cpp/ripple/AutoSocket.h index 95f513872..1a3b6db7b 100644 --- a/src/cpp/ripple/AutoSocket.h +++ b/src/cpp/ripple/AutoSocket.h @@ -123,6 +123,15 @@ public: basio::async_read_until(PlainSocket(), buffers, delim, handler); } + template + void async_read_until(basio::basic_streambuf& buffers, MatchCondition cond, Handler handler) + { + if (isSecure()) + basio::async_read_until(*mSocket, buffers, cond, handler); + else + basio::async_read_until(PlainSocket(), buffers, cond, handler); + } + template void async_write(const Buf& buffers, Handler handler) { if (isSecure())