Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of ssl::stream::get_io_service() #132

Closed
viccpp opened this issue Sep 12, 2016 · 5 comments
Closed

Status of ssl::stream::get_io_service() #132

viccpp opened this issue Sep 12, 2016 · 5 comments

Comments

@viccpp
Copy link

viccpp commented Sep 12, 2016

basic_stream_socket::get_io_service() is marked as deprecated. But what about ssl::stream::get_io_service()? It doesn't have get_executor() and doestn't compile if ASIO_NO_DEPRECATED is defined.

P.S. And why get_io_service() was deprecated? What should be used instead to obtain io_service from socket?

@vinniefalco
Copy link

How about calling lowest_layer().get_io_service()? That works for both sockets and SSL streams.

@viccpp
Copy link
Author

viccpp commented Nov 17, 2016

I use next_layer().get_executor().context(). But I'm trying to understand why get_io_service()/get_io_context() was deprecated. Every socket has associated io_service/io_context - we need to have one to construct it. And every socket has executor, every executor has associated io_service/io_context. Why deprecate handy and short getter?

@viccpp
Copy link
Author

viccpp commented Sep 10, 2017

Related #252

@vinniefalco
Copy link

I see the rationale, it is to trim the interface only to exactly that which is necessary. This is important to get consensus in the committee meetings for voting Net-TS into the standard. If you need a handy and short getter, you can always implement a simple free function that works with any object and calls get_executor().context() for you.

@viccpp
Copy link
Author

viccpp commented Nov 26, 2020

Since ASIO 1.13 socket and other stuff can be constructed using just executor. So get_io_service() isn't needed anymore.

@viccpp viccpp closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants