serializer::next replaces serializer::get (API Change):

Actions Required:

* Use serializer::next instead of serializer::get at call sites
This commit is contained in:
Vinnie Falco
2017-07-20 08:15:29 -07:00
parent b0e52dd246
commit f5ae60613f
7 changed files with 23 additions and 20 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ template<bool isRequest, class Body,
template<class Visit>
void
serializer<isRequest, Body, Fields, ChunkDecorator>::
get(error_code& ec, Visit&& visit)
next(error_code& ec, Visit&& visit)
{
using boost::asio::buffer_size;
switch(s_)
+7 -7
View File
@@ -131,7 +131,7 @@ operator()()
return s_.get_io_service().post(
bind_handler(std::move(*this), ec, 0));
lambda f{*this};
sr_.get(ec, f);
sr_.next(ec, f);
if(ec)
{
BOOST_ASSERT(! f.invoked);
@@ -298,7 +298,7 @@ operator()(error_code ec,
}
lambda f{*this};
state_ = 2;
sr_.get(ec, f);
sr_.next(ec, f);
if(ec)
{
BOOST_ASSERT(! f.invoked);
@@ -328,7 +328,7 @@ operator()(error_code ec,
if(Predicate{}(sr_))
goto upcall;
lambda f{*this};
sr_.get(ec, f);
sr_.next(ec, f);
if(ec)
{
BOOST_ASSERT(! f.invoked);
@@ -540,7 +540,7 @@ write_some(SyncWriteStream& stream, serializer<
ec.assign(0, ec.category());
return;
}
sr.get(ec, f);
sr.next(ec, f);
if(ec)
return;
if(f.invoked)
@@ -615,7 +615,7 @@ write_header(SyncWriteStream& stream, serializer<
detail::write_lambda<SyncWriteStream> f{stream};
do
{
sr.get(ec, f);
sr.next(ec, f);
if(ec)
return;
BOOST_ASSERT(f.invoked);
@@ -686,7 +686,7 @@ write(SyncWriteStream& stream, serializer<
detail::write_lambda<SyncWriteStream> f{stream};
do
{
sr.get(ec, f);
sr.next(ec, f);
if(ec)
return;
if(f.invoked)
@@ -864,7 +864,7 @@ operator<<(std::ostream& os,
detail::write_ostream_lambda<decltype(sr)> f{os, sr};
do
{
sr.get(ec, f);
sr.next(ec, f);
if(os.fail())
break;
if(ec == error::end_of_stream)
+5 -5
View File
@@ -236,7 +236,7 @@ public:
The implementation guarantees that the message passed on
construction will not be accessed until the first call to
@ref get. This allows the message to be lazily created.
@ref next. This allows the message to be lazily created.
For example, if the header is filled in before serialization.
@param msg The message to serialize, which must remain valid
@@ -327,18 +327,18 @@ public:
void visit(error_code&, ConstBufferSequence const&);
@endcode
The function is not copied, if no error occurs it will be
invoked before the call to @ref get returns.
invoked before the call to @ref next returns.
*/
template<class Visit>
void
get(error_code& ec, Visit&& visit);
next(error_code& ec, Visit&& visit);
/** Consume buffer octets in the serialization.
This function should be called after one or more octets
contained in the buffers provided in the prior call
to @ref get have been used.
to @ref next have been used.
After a call to @ref consume, callers should check the
return value of @ref is_done to determine if the entire
@@ -346,7 +346,7 @@ public:
@param n The number of octets to consume. This number must
be greater than zero and no greater than the number of
octets in the buffers provided in the prior call to @ref get.
octets in the buffers provided in the prior call to @ref next.
*/
void
consume(std::size_t n);