Friday, 13 September 2013

Boost HTTP server issue

Boost HTTP server issue

I'm starting to use Boost, so may be I'm messing something up.
I'm trying to set up http server with boost (ASIO). I've taken the code
from docs:
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/examples/cpp03_examples.html
(HTTP Server, the first one)
The only difference from the example is I'm running server by my own
method "run" and starting io_service in background thread, like in the
docs:
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/io_service.html
boost::asio::io_service::work work(io_service_);
(Also I'm stopping io_service from my run method too.)
When I'm starting this modified server everything seems to be OK, run
method is working fine. But then I'm trying to get a doc from the server
the request hangs and control flow never comes to "request_handle" method.
Am I missing something?

No comments:

Post a Comment