Opened 11 years ago
Closed 10 years ago
#6660 closed Bugs (invalid)
async_read_until() does not complete immediately when the delimeter is already in the streambuf.
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost Development Trunk | Severity: | Regression |
Keywords: | Cc: |
Description
From the async_read_some() documentation: (http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/async_read_until/over\ load2.html) "If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately." This condition appears to be met under boost 1.42.0, and not under boost 1.46.1, boost 1.49.0, or boost trunk from subversion.
A test program will be attached to this bug which contains more information.
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | boost_async_read_test.cc added |
---|
comment:1 by , 11 years ago
Summary: | async_read_some does not complete immediately when the delimeter is already in the streambuf. → async_read_until() does not complete immediately when the delimeter is already in the streambuf. |
---|
comment:2 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Your stream implementation does not strictly adhere to the AsyncReadStream requirements:
If the total size of all buffers in the sequence mb is 0, the asynchronous read operation shall complete immediately and pass 0 as the argument to the handler that specifies the number of bytes read.
The async_read_until implementation relies on this behaviour to deliver the completion handler when the streambuf already contains the delimiter.
Test program demonstrating async_read_until() behavior