asio 0.3.8rc3 | Home | Reference | Tutorial | Examples | Design

Examples |

# services::stream_socket_service< Protocol >::connect_handler< Handler > Class Template Reference

Collaboration diagram for services::stream_socket_service< Protocol >::connect_handler< Handler >:

List of all members.

## Detailed Description

### template<typename Protocol>
template<typename Handler>
class services::stream_socket_service< Protocol >::connect_handler< Handler >

Handler to wrap asynchronous connect completion.

Definition at line 138 of file stream_socket_service.hpp.

## Public Member Functions

| connect_handler (Handler h, logger &l)
void | operator() (const asio::error_code &e)

## Private Attributes

Handler | handler_
logger & | logger_

## Constructor & Destructor Documentation

template<typename Protocol>
template<typename Handler>

services::stream_socket_service< Protocol >::connect_handler< Handler >::connect_handler | ( | Handler | h,
|  | logger & | l |
| ) |  |  |

Definition at line 141 of file stream_socket_service.hpp.

    00142       : handler_(h),
    00143         logger_(l)
    00144     {
    00145     }

## Member Function Documentation

template<typename Protocol>
template<typename Handler>

void services::stream_socket_service< Protocol >::connect_handler< Handler >::operator() | ( | const asio::error_code & | e | ) |

Definition at line 147 of file stream_socket_service.hpp.

    00148     {
    00149       if (e)
    00150       {
    00151         std::string msg = "Asynchronous connect failed: ";
    00152         msg += e.message();
    00153         logger_.log(msg);
    00154       }
    00155       else
    00156       {
    00157         logger_.log("Asynchronous connect succeeded");
    00158       }
    00159
    00160       handler_(e);
    00161     }

## Member Data Documentation

template<typename Protocol>
template<typename Handler>

Handler services::stream_socket_service< Protocol >::connect_handler< Handler >::handler_`[private]`

Definition at line 164 of file stream_socket_service.hpp.

Referenced by services::stream_socket_service< Protocol >::connect_handler< Handler >::operator()().

template<typename Protocol>
template<typename Handler>

logger& services::stream_socket_service< Protocol >::connect_handler< Handler >::logger_`[private]`

Definition at line 165 of file stream_socket_service.hpp.

Referenced by services::stream_socket_service< Protocol >::connect_handler< Handler >::operator()().

The documentation for this class was generated from the following file:

- services/stream_socket_service.hpp

asio 0.3.8rc3 | Home | Reference | Tutorial | Examples | Design