|
42 | 42 | #include <boost/asio/steady_timer.hpp>
|
43 | 43 | #include <boost/asio/write.hpp>
|
44 | 44 | #include <boost/assert.hpp>
|
| 45 | +#include <boost/config.hpp> |
45 | 46 | #include <boost/core/ignore_unused.hpp>
|
46 | 47 |
|
47 | 48 | #include <array>
|
@@ -745,9 +746,15 @@ class basic_connection {
|
745 | 746 | }
|
746 | 747 |
|
747 | 748 | /// Returns a reference to the next layer.
|
| 749 | + BOOST_DEPRECATED( |
| 750 | + "Accessing the underlying stream is deprecated and will be removed in the next release. Use " |
| 751 | + "the other member functions to interact with the connection.") |
748 | 752 | auto& next_layer() noexcept { return *stream_; }
|
749 | 753 |
|
750 | 754 | /// Returns a const reference to the next layer.
|
| 755 | + BOOST_DEPRECATED( |
| 756 | + "Accessing the underlying stream is deprecated and will be removed in the next release. Use " |
| 757 | + "the other member functions to interact with the connection.") |
751 | 758 | auto const& next_layer() const noexcept { return *stream_; }
|
752 | 759 |
|
753 | 760 | /// Sets the response object of `async_receive` operations.
|
@@ -915,9 +922,15 @@ class connection {
|
915 | 922 | bool will_reconnect() const noexcept { return impl_.will_reconnect(); }
|
916 | 923 |
|
917 | 924 | /// Calls `boost::redis::basic_connection::next_layer`.
|
| 925 | + BOOST_DEPRECATED( |
| 926 | + "Accessing the underlying stream is deprecated and will be removed in the next release. Use " |
| 927 | + "the other member functions to interact with the connection.") |
918 | 928 | auto& next_layer() noexcept { return impl_.next_layer(); }
|
919 | 929 |
|
920 | 930 | /// Calls `boost::redis::basic_connection::next_layer`.
|
| 931 | + BOOST_DEPRECATED( |
| 932 | + "Accessing the underlying stream is deprecated and will be removed in the next release. Use " |
| 933 | + "the other member functions to interact with the connection.") |
921 | 934 | auto const& next_layer() const noexcept { return impl_.next_layer(); }
|
922 | 935 |
|
923 | 936 | /// Calls `boost::redis::basic_connection::reset_stream`.
|
|
0 commit comments