
On Thu, Feb 3, 2011 at 3:39 AM, Claude
Hi, it is possible obtain a Socket (boost::asio::ip::tcp::socket) from an acceptor object?
This is my problem: I use the accept() method of acceptor for wait on a connection.
But, in java, the method accept() of ServerSocket class return a socket object and I can pass this reference to a thread that handles it and I can continue to accept() in main program.
It is possible obtain this behavior with asio?
In Asio, it's the reverse -- you pass it an appropriately constructed socket to the call to acceptor::accept(...). Look at the examples for more information on how to do it the Boost.Asio and C++ way. The documentation for Boost.Asio is here: http://www.boost.org/libs/asio PS. The Boost.Asio way is very different from the Java way. -- Dean Michael Berris about.me/deanberris