Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] Handlers of asycn_send_to are called in which order?
From: Cesar Mello (cmello_at_[hidden])
Date: 2015-01-30 15:56:31


You need to chain the second call in the continuation handler of the first.
There are several ways to do this, I found this paper useful to understand
the options and the way it works:

And you should read the documentation and the examples:

I hope it helps. I am still learning the basics, but the coroutine is my
favorite by now.

Best regards

On Wed, Jan 28, 2015 at 2:29 PM, Attila Rajmund Nohl <
attila.r.nohl_at_[hidden]> wrote:

> Hello!
> My code sends UDP packets using async_send_to. If all packets are
> successfully sent, are their handlers called in the same order as the
> async_send_to calls happened? I mean if my code looks something like
> this:
> socket.async_send_to(buffer1, destination, handler1);
> socket.async_send_to(buffer2, destination, handler2);
> Is it guaranteed that handler2 is always called after handler1?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at