Boost C++ Libraries: Ticket #6660: async_read_until() does not complete immediately when the delimeter is already in the streambuf. https://svn.boost.org/trac10/ticket/6660 <p> From the async_read_some() documentation: (<a href="http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/async_read_until/over">http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/async_read_until/over</a>\ 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. </p> <p> A test program will be attached to this bug which contains more information. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6660 Trac 1.4.3 Sam Creasey <sammy@…> Wed, 07 Mar 2012 21:21:06 GMT attachment set https://svn.boost.org/trac10/ticket/6660 https://svn.boost.org/trac10/ticket/6660 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_async_read_test.cc</span> </li> </ul> <p> Test program demonstrating async_read_until() behavior </p> Ticket Sam Creasey <sammy@…> Wed, 07 Mar 2012 21:49:57 GMT summary changed https://svn.boost.org/trac10/ticket/6660#comment:1 https://svn.boost.org/trac10/ticket/6660#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">async_read_some does not complete immediately when the delimeter is already in the streambuf.</span> → <span class="trac-field-new">async_read_until() does not complete immediately when the delimeter is already in the streambuf.</span> </li> </ul> Ticket chris_kohlhoff Tue, 29 May 2012 01:04:15 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6660#comment:2 https://svn.boost.org/trac10/ticket/6660#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Your stream implementation does not strictly adhere to the <a href="http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/reference/AsyncReadStream.html">AsyncReadStream requirements</a>: </p> <blockquote> <p> 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. </p> </blockquote> <p> The async_read_until implementation relies on this behaviour to deliver the completion handler when the streambuf already contains the delimiter. </p> Ticket