Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

io_service::use_service

Obtain the service object corresponding to the given type.

template<
    typename Service>
friend Service & use_service(
    io_service & ios);

This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the io_service will create a new instance of the service.

Parameters

ios

The io_service object that owns the service.

Return Value

The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.

Requirements

Header: boost/asio/io_service.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext