diff --git a/example/echo-op/echo_op.cpp b/example/echo-op/echo_op.cpp index bb1d0ff5..33fcb293 100644 --- a/example/echo-op/echo_op.cpp +++ b/example/echo-op/echo_op.cpp @@ -186,25 +186,21 @@ async_echo( (*this)({}, 0, false); } - // This is the type of buffer sequence used to represent the - // readable bytes of the dynamic buffer_. We declare a type alias - // to make the code easier to read. - - using const_buffers_type = typename DynamicBuffer::const_buffers_type; - // If a newline is present in the buffer sequence, this function returns // the number of characters from the beginning of the buffer up to the // newline, including the newline character. Otherwise it returns zero. std::size_t - find_newline(const_buffers_type const& buffers) + find_newline(typename DynamicBuffer::const_buffers_type const& buffers) { // The `buffers_iterator` class template provides random-access // iterators into a buffer sequence. Use the standard algorithm // to look for the new line if it exists. - auto begin = net::buffers_iterator::begin(buffers); - auto end = net::buffers_iterator::end(buffers); + auto begin = net::buffers_iterator< + typename DynamicBuffer::const_buffers_type>::begin(buffers); + auto end = net::buffers_iterator< + typename DynamicBuffer::const_buffers_type>::end(buffers); auto result = std::find(begin, end, '\n'); if(result == end) diff --git a/test/beast/websocket/timer.cpp b/test/beast/websocket/timer.cpp index 4b5b4eb6..0c908cf8 100644 --- a/test/beast/websocket/timer.cpp +++ b/test/beast/websocket/timer.cpp @@ -41,7 +41,7 @@ struct timer_test : unit_test::suite ws2.set_option(stream_base::timeout{ stream_base::none(), - std::chrono::milliseconds(50), + std::chrono::milliseconds(100), true}); flat_buffer b1; flat_buffer b2; @@ -56,7 +56,7 @@ struct timer_test : unit_test::suite net::error::operation_aborted)); ws2.async_read(b2, test::fail_handler( net::error::operation_aborted)); - test::run_for(ioc, std::chrono::milliseconds(100)); + test::run_for(ioc, std::chrono::milliseconds(500)); BEAST_EXPECT(received); }