| Home | Libraries | People | FAQ | More

# 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 105 of file stream_socket_service.hpp.

## Public Member Functions

| connect_handler (Handler h, logger &l)
void | operator() (const boost::asio::error &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 108 of file stream_socket_service.hpp.

    00109       : handler_(h),
    00110         logger_(l)
    00111     {
    00112     }

## Member Function Documentation

template<typename Protocol>
template<typename Handler>

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

Definition at line 114 of file stream_socket_service.hpp.

    00115     {
    00116       if (e)
    00117       {
    00118         std::string msg = "Asynchronous connect failed: ";
    00119         msg += e.what();
    00120         logger_.log(msg);
    00121       }
    00122       else
    00123       {
    00124         logger_.log("Asynchronous connect succeeded");
    00125       }
    00126
    00127       handler_(e);
    00128     }

## Member Data Documentation

template<typename Protocol>
template<typename Handler>

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

Definition at line 131 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 132 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

| Copyright © 2003 - 2006 Christopher M. Kohlhoff