diff --git a/example/client/burl/any_stream.hpp b/example/client/burl/any_stream.hpp index ed13e94d..c5a7be84 100644 --- a/example/client/burl/any_stream.hpp +++ b/example/client/burl/any_stream.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,20 +56,26 @@ class any_stream virtual void async_write_some( - const capy::slice_of>& buffers, + boost::span buffers, + std::size_t max_bytes, asio::any_completion_handler handler) override { - stream_.async_write_some(buffers, std::move(handler)); + auto s = capy::buffer_slice(buffers, 0, max_bytes); + stream_.async_write_some( + s.data(), std::move(handler)); } virtual void async_read_some( - const capy::slice_of>& buffers, + boost::span buffers, + std::size_t max_bytes, asio::any_completion_handler handler) override { - stream_.async_read_some(buffers, std::move(handler)); + auto s = capy::buffer_slice(buffers, 0, max_bytes); + stream_.async_read_some( + s.data(), std::move(handler)); } virtual void @@ -153,7 +159,7 @@ class any_stream } BOOST_ASIO_CORO_YIELD stream_->async_write_some( - capy::prefix(buffers, wr_remain_), + buffers, wr_remain_, std::move(self)); wr_remain_ -= n; self.complete(ec, n); @@ -191,7 +197,7 @@ class any_stream } BOOST_ASIO_CORO_YIELD stream_->async_read_some( - capy::prefix(buffers, rd_remain_), + buffers, rd_remain_, std::move(self)); rd_remain_ -= n; self.complete(ec, n); @@ -226,12 +232,14 @@ class any_stream virtual void async_write_some( - const capy::slice_of>&, + boost::span, + std::size_t, asio::any_completion_handler) = 0; virtual void async_read_some( - const capy::slice_of>&, + boost::span, + std::size_t, asio::any_completion_handler) = 0; virtual void async_shutdown(