Boost logo

Boost Users :

Subject: Re: [Boost-users] async_send handler problem
From: Alexander Carôt (alexander_carot_at_[hidden])
Date: 2013-12-14 11:36:38


> I am new to boost and asio in particular. For now I am implementing a
> simple UDP sender.
> >
> > The sending process itself works fine but for some reason the send
> handler does not execute.
>
> Most likely, io_service::run() isn't running.

I see - yes, this is very likely indeed. In that context more questions:

Simply calling run in my case doesn't help: sj->dFC->io_service.run();

So I saw a number of examples, in which an extra thread is created via:

boost::thread t = boost::thread (boost::bind(&boost::asio::io_service::run, &sj->dFC->io_service));
t.join();

This didn't change anything either.

Is it correct to create an explicit thread ? If so does my base-class (which contains the async_functions) have to inherit this thread in order to make it work ? At the moment I simply create it within the class.

Thanks in advance,
best

Alex


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