Re: [Boost-bugs] [Boost C++ Libraries] #3627: boost::asio::async_read() cannot be used with null_buffers()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3627: boost::asio::async_read() cannot be used with null_buffers()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-12 21:46:23


#3627: boost::asio::async_read() cannot be used with null_buffers()
----------------------------------------------------------------+-----------
 Reporter: Dmitry Goncharov <dgoncharov@…> | Owner: chris_kohlhoff
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.40.0 | Severity: Not Applicable
 Keywords: asio async_read null_buffers |
----------------------------------------------------------------+-----------
Changes (by chris_kohlhoff):

  * type: Bugs => Feature Requests
  * severity: Problem => Not Applicable
  * milestone: Boost 1.41.0 => To Be Determined

Comment:

 The null_buffers type is only intended for use with async_read_some() and
 async_write_some() on the "lowest layer", i.e. the socket or descriptor.
 It is not part of any of the stream type requirements, and so not
 supported by composed operations such as async_read.

 If it worked with the buffered*_stream<> templates then that was just a
 side effect of the 0-byte read/write bug.

 It may or may not be useful to support null_buffers as part of the stream
 type requirements. I'm reclassifying this as a feature request as
 something to think about in the future.

 In any case:

 {{{
 Right now I have no way to check for data (async) without reading it off
 the socket.
 }}}

 is not correct. It works just fine if you use async_read_some() on the
 socket.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3627#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC