
If I followed what you wrote in your post correctly, I would end up with: void start_accept() { tcp_connection::pointer new_connection = tcp_connection::create(acceptor_.get_io_service()); //auto callback = std::bind(&tcp_server::handle_accept, this, new_connection, std::placeholders::_1); const std::function<void(tcp_connection::pointer, const boost::system::error_code &)> callback = std::bind(&tcp_server::handle_accept, this, new_connection, std::placeholders::_1); acceptor_.async_accept(new_connection->socket(), std::bind(callback, this, boost::asio::placeholders::error)); } Which does not compile. I don't know why I'd bind something that is already bound or what this would mean in the context of the second bind. -- View this message in context: http://boost.2283326.n4.nabble.com/boost-asio-asyn-accept-handler-tp4693107p... Sent from the Boost - Users mailing list archive at Nabble.com.