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:28:46


#3627: boost::asio::async_read() cannot be used with null_buffers()
----------------------------------------------------------------+-----------
 Reporter: Dmitry Goncharov <dgoncharov@…> | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: asio
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: asio async_read null_buffers |
----------------------------------------------------------------+-----------
Changes (by chris_kohlhoff):

  * severity: Regression => Problem

Comment:

 Not a regression. The null_buffers() type never worked with async_read().

 You may confirm that it doesn't work by making the following changes to
 the nonblocking example:

 @@ -117,7 +117,8 @@
      if (session_impl_.want_read() && !read_in_progress_)
      {
        read_in_progress_ = true;
 - socket_.async_read_some(
 + boost::asio::async_read(socket_,
 + //socket_.async_read_some(
            boost::asio::null_buffers(),
            boost::bind(&connection::handle_read,
              shared_from_this(),
 @@ -138,6 +139,8 @@

    void handle_read(boost::system::error_code ec)
    {
 + printf("handle_read\n");
 +
      read_in_progress_ = false;

      // Notify third party library that it can perform a read.

 I just checked against 1.39.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3627#comment:2>
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