Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60685 - trunk/libs/asio/example/http/client
From: chris_at_[hidden]
Date: 2010-03-17 22:15:24


Author: chris_kohlhoff
Date: 2010-03-17 22:15:23 EDT (Wed, 17 Mar 2010)
New Revision: 60685
URL: http://svn.boost.org/trac/boost/changeset/60685

Log:
Add note to examples on how to limit asio::streambuf growth.

Text files modified:
   trunk/libs/asio/example/http/client/async_client.cpp | 4 +++-
   trunk/libs/asio/example/http/client/sync_client.cpp | 4 +++-
   2 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/libs/asio/example/http/client/async_client.cpp
==============================================================================
--- trunk/libs/asio/example/http/client/async_client.cpp (original)
+++ trunk/libs/asio/example/http/client/async_client.cpp 2010-03-17 22:15:23 EDT (Wed, 17 Mar 2010)
@@ -91,7 +91,9 @@
   {
     if (!err)
     {
- // Read the response status line.
+ // Read the response status line. The response_ streambuf will
+ // automatically grow to accommodate the entire line. The growth may be
+ // limited by passing a maximum size to the streambuf constructor.
       boost::asio::async_read_until(socket_, response_, "\r\n",
           boost::bind(&client::handle_read_status_line, this,
             boost::asio::placeholders::error));

Modified: trunk/libs/asio/example/http/client/sync_client.cpp
==============================================================================
--- trunk/libs/asio/example/http/client/sync_client.cpp (original)
+++ trunk/libs/asio/example/http/client/sync_client.cpp 2010-03-17 22:15:23 EDT (Wed, 17 Mar 2010)
@@ -60,7 +60,9 @@
     // Send the request.
     boost::asio::write(socket, request);
 
- // Read the response status line.
+ // Read the response status line. The response streambuf will automatically
+ // grow to accommodate the entire line. The growth may be limited by passing
+ // a maximum size to the streambuf constructor.
     boost::asio::streambuf response;
     boost::asio::read_until(socket, response, "\r\n");
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk