Boost logo

Boost Users :

Subject: [Boost-users] Can I call async_write twice in a row?
From: Germán Diago (germandiago_at_[hidden])
Date: 2010-09-23 11:20:57


Is this legal? I think I understood in the documentation that it
isn't, but I'm not
sure if it means this:

void func() {

     async_write(....);
     async_write(...);
}

So, should I do this ALWAYS?

void func() {
    async_write(..., another_func);
}

void another_func(const boost::system::error_code & ec,
                           std::size_t bytes) {
    async_write(...);

}

Thanks in advance.


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