Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost ASIO issue
From: Igor R (boost.lists_at_[hidden])
Date: 2010-03-04 18:57:09


>   boost::asio::async_write(*_socket, buffers, boost::bind(&DJClient::handle_write, this, boost::asio::placeholders::error));
> For the above code, handle_write is never called. I can see on the server side that the server has received the request and has also sent the response. But I do not receive the response in the client side. It seems something is going wrong with io_service

If the handlers are not invoked, your io_serivce probably isn't
running. Try to add a log message after io_service::run() call, so
that you'll see when it exits. If your design needs io_service
restart, don't forget to call io_servie::reset() before any subsequent
run().
If you see that the io_service::run() doesn't exit, then maybe one of
the handlers blocks the io_service queue (eg., due to some mutex lock
or something like that).


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net