Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <boost/system/error_code.hpp>
- #include <boost/asio/async_result.hpp>
- #include <boost/asio/detail/handler_type_requirements.hpp>
- template<
- class ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(
- ReadHandler, void(boost::system::error_code, std::size_t))
- async_read(ReadHandler&& handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
- boost::asio::async_completion<ReadHandler,
- void(boost::system::error_code, std::size_t)> init(handler);
- return init.result.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement