handler_ptr is deprecated (API Change):

* `handler_ptr` is deprecated and should not be used.

Actions Required:

* Replace use of `handler_ptr` with `stable_async_base`
  and `allocate_stable`.
This commit is contained in:
Vinnie Falco committed 2019-03-06 10:38:08 -08:00
1 parent 7f53b0f66c
commit 45353a7f04
27 files changed
+95 -64

No files matched your search

+8 -8
View File
@@ -425,7 +425,7 @@ public:
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
op.invoke(true);
op.complete(true);
}
{
net::io_context ioc;
@@ -433,7 +433,7 @@ public:
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
op.invoke(false);
op.complete(false);
ioc.run();
}
{
@@ -441,7 +441,7 @@ public:
test::handler,
simple_executor> op(
test::any_handler(), {});
op.invoke_now();
op.complete_now();
}
// legacy hooks
@@ -499,7 +499,7 @@ public:
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
op.invoke(true);
op.complete(true);
}
{
net::io_context ioc;
@@ -507,7 +507,7 @@ public:
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
op.invoke(false);
op.complete(false);
ioc.run();
}
{
@@ -515,7 +515,7 @@ public:
test::handler,
simple_executor> op(
test::any_handler(), {});
op.invoke_now();
op.complete_now();
}
// legacy hooks
@@ -620,7 +620,7 @@ public:
// `net::post` will be used to call the completion handler, otherwise
// the completion handler will be invoked directly.
this->invoke(is_continuation, ec, total_bytes_transferred_);
this->complete(is_continuation, ec, total_bytes_transferred_);
}
};
@@ -707,7 +707,7 @@ public:
}
// The base class destroys the temporary data automatically, before invoking the final completion handler
this->invoke_now(ec);
this->complete_now(ec);
}
};
+7
View File
@@ -7,6 +7,11 @@
// Official repository: https://github.com/boostorg/beast
//
#ifdef BOOST_BEAST_ALLOW_DEPRECATED
#undef BOOST_BEAST_ALLOW_DEPRECATED
#define BOOST_BEAST_ALLOW_DEPRECATED 0
#endif
// Test that header file is self-contained.
#include <boost/beast/core/handler_ptr.hpp>
@@ -121,3 +126,5 @@ BEAST_DEFINE_TESTSUITE(beast,core,handler_ptr);
} // beast
} // boost
#undef BOOST_BEAST_ALLOW_DEPRECATED
+2 -2
View File
@@ -110,7 +110,7 @@ class counted_stream
// Count the bytes transferred towards the total
stream_.bytes_read_ += bytes_transferred;
this->invoke_now(ec, bytes_transferred);
this->complete_now(ec, bytes_transferred);
}
};
@@ -156,7 +156,7 @@ class counted_stream
// Count the bytes transferred towards the total
stream_.bytes_written_ += bytes_transferred;
this->invoke_now(ec, bytes_transferred);
this->complete_now(ec, bytes_transferred);
}
};