11 #ifndef ASIO_IMPL_IO_SERVICE_HPP 12 #define ASIO_IMPL_IO_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 25 template <
typename Service>
29 (void)static_cast<io_service::service*>(static_cast<Service*>(0));
30 (void)static_cast<const io_service::id*>(&Service::id);
32 return ios.service_registry_->template use_service<Service>();
42 template <
typename Service>
46 (void)static_cast<io_service::service*>(static_cast<Service*>(0));
47 (void)static_cast<const io_service::id*>(&Service::id);
49 ios.service_registry_->template add_service<Service>(svc);
52 template <
typename Service>
56 (void)static_cast<io_service::service*>(static_cast<Service*>(0));
57 (void)static_cast<const io_service::id*>(&Service::id);
59 return ios.service_registry_->template has_service<Service>();
66 #if defined(ASIO_HAS_IOCP) 76 template <
typename CompletionHandler>
85 CompletionHandler, void ()>
init(
93 template <
typename CompletionHandler>
102 CompletionHandler, void ()>
init(
110 template <
typename Handler>
111 #if defined(GENERATING_DOCUMENTATION) 122 : io_service_impl_(io_service.impl_)
124 io_service_impl_.work_started();
128 : io_service_impl_(other.io_service_impl_)
130 io_service_impl_.work_started();
135 io_service_impl_.work_finished();
140 return io_service_impl_.get_io_service();
152 #endif // ASIO_IMPL_IO_SERVICE_HPP Provides core I/O functionality.
post(ASIO_MOVE_ARG(CompletionHandler) handler)
Request the io_service to invoke the given handler and return immediately.
Class to inform the io_service when it has work to do.
asio::basic_streambuf< Allocator > MatchCondition enable_if< is_match_condition< MatchCondition >::value >::type *detail::async_result_init< ReadHandler, void(asio::error_code, std::size_t)> init(ASIO_MOVE_CAST(ReadHandler)(handler))
Service & use_service(io_service &ios)
asio::io_service & get_io_service()
Get the io_service object that owns the service.
class task_io_service io_service_impl
~work()
Destructor notifies the io_service that the work is complete.
ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler, void(asio::error_code, Iterator)) async_connect(basic_socket< Protocol
asio::io_service & get_io_service()
Get the io_service associated with the work.
void add_service(io_service &ios, Service *svc)
detail::wrapped_handler< io_service &, Handler > wrap(Handler handler)
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
work(asio::io_service &io_service)
Constructor notifies the io_service that work is starting.
bool has_service(io_service &ios)
handler_type< Handler, Signature >::type handler
#define ASIO_MOVE_CAST(type)
#define ASIO_COMPLETION_HANDLER_CHECK(handler_type, handler)
async_result< typename handler_type< Handler, Signature >::type > result