Boost logo

Boost Users :

Subject: [Boost-users] [asio] How to get informed about failed connection attempts?
From: for-gmane (for-gmane_at_[hidden])
Date: 2010-10-10 09:48:56


The following code (from the examples) accepts a connection
and calls the handler handle_accept().
But it calls the handler only if the connection attempt (internally) succeeds.
The handler gets not called if the connection fails (for example
when an ssl-connection-attempt fails due to wrong keys etc.).
What should I do to get informed also about such failed connection attempts?

  acceptor_.async_accept(new_session->socket(),
    boost::bind(&server::handle_accept, this, new_session,
      boost::asio::placeholders::error));


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net