Boost logo

Boost Users :

Subject: [Boost-users] [asio] multiple simultaneous async_read calls
From: bbxiong (bbxiong.xiao_at_[hidden])
Date: 2014-08-07 21:54:15


Hello, all,

If i write some code like this:

boost::asio::async_read(socket_, bosot::asio::buffer(buffer1_.data(), len1,
handler1);
boost::asio::async_read(socket_, boost::asio::buffer(buffer2_.data(), len2,
handler2);

Will asio guarantee len1 bytes received by the first async_read, then
schedule async_read2?

or the result is undefined(like several bytes filled into buffer1, then
next several bytes into buffer, then next several bytes into buffer1)?

if the result is undefined, why asio don't add a check here?

Thanks all 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