Answer the question
In order to leave comments, you need to log in
What is transferred with bind?
Had seen. here is the code:
_acceptor.async_accept(_socket,
boost::bind(&Acceptor::handleAccept,
this,
boost::asio::placeholders::error));
void Server::Acceptor::handleAccept(const boost::system::error_code &e)
Answer the question
In order to leave comments, you need to log in
Acceptor::handleAccept is a non-static method of the Acceptor class.
For static methods, the first parameter must be a pointer to an instance of the class. When you call class methods directly, the compiler does this substitution implicitly. When you do this through bind, you need to pass such a pointer yourself, in this case, this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question