Boost::asio get_io_service() alternative in boost 1.70+

Viewed 1950

I want to use a library (https://github.com/onlinecity/cpp-smpp) and it's based on boost 1.41. But in our project, we are using 1.72.

There is a code there that gets io_service from a TCP socket (socket->get_io_service()here). Then this object is used in the following parts of the code:

deadline_timer timer(ioService);

and

ioService.run_one();
ioService.reset();

But get_io_service() is removed from boost 1.70+. What functions and objects I should use instead of those in such situations?

UPDATE

There is another question (Alternative to deprecated get_io_service()) that is similar to mine, but the answers in that question do not work in the scenario of this one.

1 Answers
Related