Boost logo

Boost Users :

Subject: [Boost-users] ASIO async_accept() and c++2011 lambas
From: Claude (clros_at_[hidden])
Date: 2011-07-27 03:48:09

I found this example for use the async_accept() method:

void accept_handler(const boost::system::error_code& error)
  if (!error)
    // Accept succeeded.


boost::asio::ip::tcp::acceptor acceptor(io_service);
boost::asio::ip::tcp::socket socket(io_service);
acceptor.async_accept(socket, accept_handler);

It is possible use the async_accept with a (c++0x) lambda function instead
of the function accept_handler()?

View this message in context:
Sent from the Boost - Users mailing list archive at

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at