[boost-users][asio] Make asio::strand using tcp::socket

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[boost-users][asio] Make asio::strand using tcp::socket

Boost - Users mailing list
Hello everyone,

How do I create this strand using the io_context of the socket in boost 1.70. 
 
asio::ip::tcp::socket socket;
asio::io_context::strand strand( socket.get_executor().context() );

Thanks
Tom

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [boost-users][asio] Make asio::strand using tcp::socket

Boost - Users mailing list

Note that `asio::io_context::strand` is an extension not available in the Networking TS. `asio::strand<E>` is the "standard" type.

On Sat, Jun 22, 2019 at 10:32 AM Fiver Dev via Boost-users <[hidden email]> wrote:
Hello everyone,

How do I create this strand using the io_context of the socket in boost 1.70. 
 
asio::ip::tcp::socket socket;
asio::io_context::strand strand( socket.get_executor().context() );

Thanks
Tom
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users