1

Is it possible and recommended to create custom handlers for boost::asio? Are there tutorials on how to do it? After searching for quite some time for it I didn't find anything (only custom allocators in boost::asio).

asio currently supports to provide callbacks, using use_awaitable, use_future for std::futures and more. I would like to have an implementation which works with a boost::future or another kind of future (like the one from stlab) rather than a std::future. Of course, I could study the boost source code and try to mimic it, but that seems rather cumbersome with all the portability details.

mg84
  • 287
  • 2
  • 9

1 Answers1

0

"all the portability details" aren't so many, and you want them anyways.

Yes, study the source code e.g. for use_future which has an (outdated) implementation on this site:

sehe
  • 374,641
  • 47
  • 450
  • 633