 <p>An accept handler may only take an error code as a parameter, see: <a href="http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/AcceptHandler.html" rel="nofollow">AcceptHandler</a>. </p> <p>I recommend making <code>acceptor</code> a member of <code>CServerSocket</code> then changing the call to <code>async_accept</code> to:</p> <pre><code>acceptor.async_accept(*socket, std::bind(&amp;CServerSocket::OnAccept, this, std::placeholders::_1)); </code></pre> <p>and accessing <code>acceptor</code> within the <code>OnAccept</code> member function.</p>