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


Hi,
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: http://boost.2283326.n4.nabble.com/ASIO-async-accept-and-c-2011-lambas-tp3697807p3697807.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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