Add basic_stream::rebind_executor

This commit is contained in:
Vinnie Falco
2019-10-30 19:50:54 -07:00
parent 7cc8759261
commit d64e5f718c
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
Version 275: Version 275:
* Async init-fns use the executor's default token * Async init-fns use the executor's default token
* Add basic_stream::rebind_executor
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -217,6 +217,15 @@ public:
*/ */
using executor_type = beast::executor_type<socket_type>; using executor_type = beast::executor_type<socket_type>;
/// Rebinds the stream type to another executor.
template<class Executor1>
struct rebind_executor
{
/// The stream type when rebound to the specified executor.
using other = basic_stream<
Protocol, Executor1, RatePolicy>;
};
/// The protocol type. /// The protocol type.
using protocol_type = Protocol; using protocol_type = Protocol;