From afde7508f1aea52d6e9af2deee01b6b8aca194de Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 13 May 2017 09:27:06 -0700 Subject: [PATCH] Tidy up formal parameter names fix #361 --- CHANGELOG.md | 1 + include/beast/http/basic_parser.hpp | 2 +- include/beast/http/impl/async_read.ipp | 22 ++++---- include/beast/http/impl/basic_parser.ipp | 14 ++--- include/beast/http/impl/read.ipp | 54 +++++++++---------- include/beast/http/read.hpp | 36 ++++++------- .../beast/websocket/detail/pmd_extension.hpp | 8 +-- include/beast/websocket/impl/read.ipp | 20 +++---- include/beast/websocket/stream.hpp | 24 ++++----- test/http/message_parser.cpp | 6 +-- test/websocket/stream.cpp | 8 +-- 11 files changed, 98 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3c51ed..162237c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 41 * Trim Appveyor matrix rows * Concept revision and documentation * Remove coveralls integration +* Tidy up formal parameter names API Changes diff --git a/include/beast/http/basic_parser.hpp b/include/beast/http/basic_parser.hpp index 0cda49d3..fad52ee6 100644 --- a/include/beast/http/basic_parser.hpp +++ b/include/beast/http/basic_parser.hpp @@ -505,7 +505,7 @@ public: */ template std::size_t - copy_body(DynamicBuffer& dynabuf); + copy_body(DynamicBuffer& buffer); /** Returns a set of buffers for storing body data. diff --git a/include/beast/http/impl/async_read.ipp b/include/beast/http/impl/async_read.ipp index b095e2cc..08f269e3 100644 --- a/include/beast/http/impl/async_read.ipp +++ b/include/beast/http/impl/async_read.ipp @@ -579,7 +579,7 @@ async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_some( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler) { @@ -592,14 +592,14 @@ async_read_some( detail::read_some_buffer_op>{ - init.completion_handler, stream, dynabuf, parser}; + init.completion_handler, stream, buffer, parser}; break; default: detail::read_some_body_op>{ - init.completion_handler, stream, dynabuf, parser}; + init.completion_handler, stream, buffer, parser}; break; } return init.result.get(); @@ -615,7 +615,7 @@ async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_some( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler) { @@ -624,7 +624,7 @@ async_read_some( detail::read_some_buffer_op>{ - init.completion_handler, stream, dynabuf, parser}; + init.completion_handler, stream, buffer, parser}; return init.result.get(); } @@ -641,7 +641,7 @@ async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_some( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler) { @@ -650,7 +650,7 @@ async_read_some( static_assert(is_dynamic_buffer::value, "DynamicBuffer requirements not met"); BOOST_ASSERT(! parser.is_complete()); - return detail::async_read_some(stream, dynabuf, parser, + return detail::async_read_some(stream, buffer, parser, std::forward(handler)); } @@ -663,7 +663,7 @@ async_return_type< ReadHandler, void(error_code)> async_read( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler) { @@ -677,7 +677,7 @@ async_read( detail::parse_op>{ - init.completion_handler, stream, dynabuf, parser}; + init.completion_handler, stream, buffer, parser}; return init.result.get(); } @@ -690,7 +690,7 @@ async_return_type< ReadHandler, void(error_code)> async_read( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg, ReadHandler&& handler) { @@ -710,7 +710,7 @@ async_read( detail::read_message_op>{ - init.completion_handler, stream, dynabuf, msg}; + init.completion_handler, stream, buffer, msg}; return init.result.get(); } diff --git a/include/beast/http/impl/basic_parser.ipp b/include/beast/http/impl/basic_parser.ipp index f6e81d9b..36400c73 100644 --- a/include/beast/http/impl/basic_parser.ipp +++ b/include/beast/http/impl/basic_parser.ipp @@ -117,14 +117,14 @@ template template std::size_t basic_parser:: -copy_body(DynamicBuffer& dynabuf) +copy_body(DynamicBuffer& buffer) { // This function not available when isDirect==false static_assert(isDirect, ""); using boost::asio::buffer_copy; using boost::asio::buffer_size; - BOOST_ASSERT(dynabuf.size() > 0); + BOOST_ASSERT(buffer.size() > 0); BOOST_ASSERT( state_ == parse_state::body || state_ == parse_state::body_to_eof || @@ -135,14 +135,14 @@ copy_body(DynamicBuffer& dynabuf) case parse_state::body_to_eof: { auto const buffers = - impl().on_prepare(dynabuf.size()); + impl().on_prepare(buffer.size()); BOOST_ASSERT( buffer_size(buffers) >= 1 && buffer_size(buffers) <= - dynabuf.size()); + buffer.size()); auto const n = buffer_copy( - buffers, dynabuf.data()); - dynabuf.consume(n); + buffers, buffer.data()); + buffer.consume(n); impl().on_commit(n); return n; } @@ -158,7 +158,7 @@ copy_body(DynamicBuffer& dynabuf) buffer_size(buffers) <= beast::detail::clamp(len_)); auto const n = buffer_copy( - buffers, dynabuf.data()); + buffers, buffer.data()); commit_body(n); return n; } diff --git a/include/beast/http/impl/read.ipp b/include/beast/http/impl/read.ipp index f971bf04..98c8c938 100644 --- a/include/beast/http/impl/read.ipp +++ b/include/beast/http/impl/read.ipp @@ -32,17 +32,17 @@ inline std::size_t read_some_buffer( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { std::size_t bytes_used; - if(dynabuf.size() == 0) + if(buffer.size() == 0) goto do_read; for(;;) { bytes_used = parser.write( - dynabuf.data(), ec); + buffer.data(), ec); if(ec) return 0; if(bytes_used > 0) @@ -51,11 +51,11 @@ read_some_buffer( boost::optional mb; auto const size = - read_size_helper(dynabuf, 65536); + read_size_helper(buffer, 65536); BOOST_ASSERT(size > 0); try { - mb.emplace(dynabuf.prepare(size)); + mb.emplace(buffer.prepare(size)); } catch(std::length_error const&) { @@ -86,7 +86,7 @@ read_some_buffer( return 0; } BOOST_ASSERT(bytes_transferred > 0); - dynabuf.commit(bytes_transferred); + buffer.commit(bytes_transferred); } do_finish: return bytes_used; @@ -100,12 +100,12 @@ inline std::size_t read_some_body( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { - if(dynabuf.size() > 0) - return parser.copy_body(dynabuf); + if(buffer.size() > 0) + return parser.copy_body(buffer); boost::optional mb; try @@ -145,7 +145,7 @@ inline std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { @@ -154,11 +154,11 @@ read_some( case parse_state::header: case parse_state::chunk_header: return detail::read_some_buffer( - stream, dynabuf, parser, ec); + stream, buffer, parser, ec); default: return detail::read_some_body( - stream, dynabuf, parser, ec); + stream, buffer, parser, ec); } } @@ -170,12 +170,12 @@ inline std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { return detail::read_some_buffer( - stream, dynabuf, parser, ec); + stream, buffer, parser, ec); } } // detail @@ -189,7 +189,7 @@ template< std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser) { static_assert(is_sync_read_stream::value, @@ -199,7 +199,7 @@ read_some( BOOST_ASSERT(! parser.is_complete()); error_code ec; auto const bytes_used = - read_some(stream, dynabuf, parser, ec); + read_some(stream, buffer, parser, ec); if(ec) throw system_error{ec}; return bytes_used; @@ -212,7 +212,7 @@ template< std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { @@ -221,7 +221,7 @@ read_some( static_assert(is_dynamic_buffer::value, "DynamicBuffer requirements not met"); BOOST_ASSERT(! parser.is_complete()); - return detail::read_some(stream, dynabuf, parser, ec); + return detail::read_some(stream, buffer, parser, ec); } template< @@ -231,7 +231,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser) { static_assert(is_sync_read_stream::value, @@ -240,7 +240,7 @@ read( "DynamicBuffer requirements not met"); BOOST_ASSERT(! parser.is_complete()); error_code ec; - read(stream, dynabuf, parser, ec); + read(stream, buffer, parser, ec); if(ec) throw system_error{ec}; } @@ -252,7 +252,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec) { @@ -264,10 +264,10 @@ read( do { auto const bytes_used = - read_some(stream, dynabuf, parser, ec); + read_some(stream, buffer, parser, ec); if(ec) return; - dynabuf.consume(bytes_used); + buffer.consume(bytes_used); } while(! parser.is_complete()); } @@ -279,7 +279,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg) { static_assert(is_sync_read_stream::value, @@ -294,7 +294,7 @@ read( message>::value, "Reader requirements not met"); error_code ec; - beast::http::read(stream, dynabuf, msg, ec); + beast::http::read(stream, buffer, msg, ec); if(ec) throw system_error{ec}; } @@ -306,7 +306,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg, error_code& ec) { @@ -322,7 +322,7 @@ read( message>::value, "Reader requirements not met"); message_parser p; - beast::http::read(stream, dynabuf, p, ec); + beast::http::read(stream, buffer, p, ec); if(ec) return; msg = p.release(); diff --git a/include/beast/http/read.hpp b/include/beast/http/read.hpp index 16a7dd1e..77d003e6 100644 --- a/include/beast/http/read.hpp +++ b/include/beast/http/read.hpp @@ -49,7 +49,7 @@ namespace http { @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -70,7 +70,7 @@ template< std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser); /** Read some HTTP/1 message data from a stream. @@ -105,7 +105,7 @@ read_some( @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -126,7 +126,7 @@ template< std::size_t read_some( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec); @@ -169,7 +169,7 @@ read_some( @param stream The stream from which the data is to be read. The type must support the @b AsyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -198,7 +198,7 @@ async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_some( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler); @@ -228,7 +228,7 @@ async_read_some( @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -245,7 +245,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser); /** Read an HTTP/1 message from a stream. @@ -272,7 +272,7 @@ read( @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -289,7 +289,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, error_code& ec); @@ -320,7 +320,7 @@ read( @param stream The stream from which the data is to be read. The type must support the @b AsyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -348,7 +348,7 @@ async_return_type< ReadHandler, void(error_code)> async_read( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, basic_parser& parser, ReadHandler&& handler); @@ -376,7 +376,7 @@ async_read( @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -395,7 +395,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg); /** Read a HTTP/1 message from a stream. @@ -422,7 +422,7 @@ read( @param stream The stream from which the data is to be read. The type must support the @b SyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -441,7 +441,7 @@ template< void read( SyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg, error_code& ec); @@ -472,7 +472,7 @@ read( @param stream The stream to read the message from. The type must support the @b AsyncReadStream concept. - @param dynabuf A @b DynamicBuffer holding additional bytes + @param buffer A @b DynamicBuffer holding additional bytes read by the implementation from the stream. This is both an input and an output parameter; on entry, any data in the dynamic buffer's input sequence will be given to the parser @@ -503,7 +503,7 @@ async_return_type< ReadHandler, void(error_code)> async_read( AsyncReadStream& stream, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, message& msg, ReadHandler&& handler); diff --git a/include/beast/websocket/detail/pmd_extension.hpp b/include/beast/websocket/detail/pmd_extension.hpp index b8fb8bcb..0c6a9d60 100644 --- a/include/beast/websocket/detail/pmd_extension.hpp +++ b/include/beast/websocket/detail/pmd_extension.hpp @@ -356,7 +356,7 @@ template void inflate( InflateStream& zi, - DynamicBuffer& dynabuf, + DynamicBuffer& buffer, boost::asio::const_buffer const& in, error_code& ec) { @@ -368,13 +368,13 @@ inflate( for(;;) { // VFALCO we could be smarter about the size - auto const bs = dynabuf.prepare( - read_size_helper(dynabuf, 65536)); + auto const bs = buffer.prepare( + read_size_helper(buffer, 65536)); auto const out = *bs.begin(); zs.avail_out = buffer_size(out); zs.next_out = buffer_cast(out); zi.write(zs, zlib::Flush::sync, ec); - dynabuf.commit(zs.total_out); + buffer.commit(zs.total_out); zs.total_out = 0; if( ec == zlib::error::need_buffers || ec == zlib::error::end_of_stream) diff --git a/include/beast/websocket/impl/read.ipp b/include/beast/websocket/impl/read.ipp index 74527318..0a524425 100644 --- a/include/beast/websocket/impl/read.ipp +++ b/include/beast/websocket/impl/read.ipp @@ -689,7 +689,7 @@ async_return_type< ReadHandler, void(error_code)> stream:: async_read_frame(frame_info& fi, - DynamicBuffer& dynabuf, ReadHandler&& handler) + DynamicBuffer& buffer, ReadHandler&& handler) { static_assert(is_async_stream::value, "AsyncStream requirements requirements not met"); @@ -699,7 +699,7 @@ async_read_frame(frame_info& fi, void(error_code)> init{handler}; read_frame_op>{init.completion_handler, - *this, fi, dynabuf}; + *this, fi, buffer}; return init.result.get(); } @@ -707,14 +707,14 @@ template template void stream:: -read_frame(frame_info& fi, DynamicBuffer& dynabuf) +read_frame(frame_info& fi, DynamicBuffer& buffer) { static_assert(is_sync_stream::value, "SyncStream requirements not met"); static_assert(beast::is_dynamic_buffer::value, "DynamicBuffer requirements not met"); error_code ec; - read_frame(fi, dynabuf, ec); + read_frame(fi, buffer, ec); if(ec) throw system_error{ec}; } @@ -1101,7 +1101,7 @@ async_return_type< ReadHandler, void(error_code)> stream:: async_read(opcode& op, - DynamicBuffer& dynabuf, ReadHandler&& handler) + DynamicBuffer& buffer, ReadHandler&& handler) { static_assert(is_async_stream::value, "AsyncStream requirements requirements not met"); @@ -1111,7 +1111,7 @@ async_read(opcode& op, void(error_code)> init{handler}; read_op>{init.completion_handler, - *this, op, dynabuf}; + *this, op, buffer}; return init.result.get(); } @@ -1119,14 +1119,14 @@ template template void stream:: -read(opcode& op, DynamicBuffer& dynabuf) +read(opcode& op, DynamicBuffer& buffer) { static_assert(is_sync_stream::value, "SyncStream requirements not met"); static_assert(beast::is_dynamic_buffer::value, "DynamicBuffer requirements not met"); error_code ec; - read(op, dynabuf, ec); + read(op, buffer, ec); if(ec) throw system_error{ec}; } @@ -1135,7 +1135,7 @@ template template void stream:: -read(opcode& op, DynamicBuffer& dynabuf, error_code& ec) +read(opcode& op, DynamicBuffer& buffer, error_code& ec) { static_assert(is_sync_stream::value, "SyncStream requirements not met"); @@ -1144,7 +1144,7 @@ read(opcode& op, DynamicBuffer& dynabuf, error_code& ec) frame_info fi; for(;;) { - read_frame(fi, dynabuf, ec); + read_frame(fi, buffer, ec); if(ec) break; op = fi.op; diff --git a/include/beast/websocket/stream.hpp b/include/beast/websocket/stream.hpp index bcaead58..0ac02bbb 100644 --- a/include/beast/websocket/stream.hpp +++ b/include/beast/websocket/stream.hpp @@ -2351,14 +2351,14 @@ public: @param op A value to receive the message type. This object must remain valid until the handler is called. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. @throws system_error Thrown on failure. */ template void - read(opcode& op, DynamicBuffer& dynabuf); + read(opcode& op, DynamicBuffer& buffer); /** Read a message from the stream. @@ -2391,14 +2391,14 @@ public: @param op A value to receive the message type. This object must remain valid until the handler is called. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. @param ec Set to indicate what error occurred, if any. */ template void - read(opcode& op, DynamicBuffer& dynabuf, error_code& ec); + read(opcode& op, DynamicBuffer& buffer, error_code& ec); /** Start an asynchronous operation to read a message from the stream. @@ -2442,7 +2442,7 @@ public: @param op A value to receive the message type. This object must remain valid until the handler is called. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. This object must remain valid until the handler is called. @@ -2462,7 +2462,7 @@ public: template async_return_type< ReadHandler, void(error_code)> - async_read(opcode& op, DynamicBuffer& dynabuf, ReadHandler&& handler); + async_read(opcode& op, DynamicBuffer& buffer, ReadHandler&& handler); /** Read a message frame from the stream. @@ -2498,14 +2498,14 @@ public: @param fi An object to store metadata about the message. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. @throws system_error Thrown on failure. */ template void - read_frame(frame_info& fi, DynamicBuffer& dynabuf); + read_frame(frame_info& fi, DynamicBuffer& buffer); /** Read a message frame from the stream. @@ -2541,14 +2541,14 @@ public: @param fi An object to store metadata about the message. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. @param ec Set to indicate what error occurred, if any. */ template void - read_frame(frame_info& fi, DynamicBuffer& dynabuf, error_code& ec); + read_frame(frame_info& fi, DynamicBuffer& buffer, error_code& ec); /** Start an asynchronous operation to read a message frame from the stream. @@ -2596,7 +2596,7 @@ public: @param fi An object to store metadata about the message. This object must remain valid until the handler is called. - @param dynabuf A dynamic buffer to hold the message data after + @param buffer A dynamic buffer to hold the message data after any masking or decompression has been applied. This object must remain valid until the handler is called. @@ -2617,7 +2617,7 @@ public: async_return_type< ReadHandler, void(error_code)> async_read_frame(frame_info& fi, - DynamicBuffer& dynabuf, ReadHandler&& handler); + DynamicBuffer& buffer, ReadHandler&& handler); /** Write a message to the stream. diff --git a/test/http/message_parser.cpp b/test/http/message_parser.cpp index 71e6aa57..fb60cb8d 100644 --- a/test/http/message_parser.cpp +++ b/test/http/message_parser.cpp @@ -37,12 +37,12 @@ public: beast::test::string_istream ss{get_io_service(), s}; error_code ec; #if 0 - multi_buffer dynabuf; + multi_buffer buffer; #else - flat_buffer dynabuf{1024}; + flat_buffer buffer{1024}; #endif message m; - read(ss, dynabuf, m, ec); + read(ss, buffer, m, ec); if(! BEAST_EXPECTS(! ec, ec.message())) return; pred(m); diff --git a/test/websocket/stream.cpp b/test/websocket/stream.cpp index 4326108e..2cbbd3f5 100644 --- a/test/websocket/stream.cpp +++ b/test/websocket/stream.cpp @@ -263,9 +263,9 @@ public: class NextLayer, class DynamicBuffer> void read(stream& ws, - opcode& op, DynamicBuffer& dynabuf) const + opcode& op, DynamicBuffer& buffer) const { - ws.read(op, dynabuf); + ws.read(op, buffer); } template< @@ -499,10 +499,10 @@ public: class NextLayer, class DynamicBuffer> void read(stream& ws, - opcode& op, DynamicBuffer& dynabuf) const + opcode& op, DynamicBuffer& buffer) const { error_code ec; - ws.async_read(op, dynabuf, yield_[ec]); + ws.async_read(op, buffer, yield_[ec]); if(ec) throw system_error{ec}; }