Boost logo

Boost Users :

Subject: Re: [Boost-users] Why boost::asio doesn't work???
From: Igor R (boost.lists_at_[hidden])
Date: 2009-07-27 12:40:15


> Igor, that doesn't seem correct to me, from what I can tell (by reading the docs, and using it) is that io_service::run() will not return immediately if there is no work.
>
> http://eckhart.stderr.org/doc/libasio-doc/reference/a00032.html#c84bed0d1dd061bc71010ba1228439da
>
> "The run() function blocks until all work has finished and there are no more handlers to be dispatched, or until the io_service has been stopped."

I don't quite understand how you came to your conclusion from the
above quotation, as it states exactly the opposite.
But anyway, try and run the following code:

#include <boost/asio.hpp>
int main()
{
  asio::io_service io;
  asio::ip::tcp::socket sock(ip);
  io.run();
}


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