Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79712 - branches/release/boost/asio
From: chris_at_[hidden]
Date: 2012-07-24 01:42:43


Author: chris_kohlhoff
Date: 2012-07-24 01:42:42 EDT (Tue, 24 Jul 2012)
New Revision: 79712
URL: http://svn.boost.org/trac/boost/changeset/79712

Log:
Merge from trunk:

* Instead of using tie(), set the ios_base::unitbuf flag to force the stream to be flushed after every insertion. Fixes #7162

Text files modified:
   branches/release/boost/asio/basic_socket_iostream.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: branches/release/boost/asio/basic_socket_iostream.hpp
==============================================================================
--- branches/release/boost/asio/basic_socket_iostream.hpp (original)
+++ branches/release/boost/asio/basic_socket_iostream.hpp 2012-07-24 01:42:42 EDT (Tue, 24 Jul 2012)
@@ -53,7 +53,7 @@
         basic_socket_streambuf<Protocol, StreamSocketService, \
           Time, TimeTraits, TimerService> >::member) \
   { \
- tie(this); \
+ this->setf(std::ios_base::unitbuf); \
     if (rdbuf()->connect(BOOST_PP_ENUM_PARAMS(n, x)) == 0) \
       this->setstate(std::ios_base::failbit); \
   } \
@@ -112,7 +112,7 @@
         basic_socket_streambuf<Protocol, StreamSocketService,
           Time, TimeTraits, TimerService> >::member)
   {
- tie(this);
+ this->setf(std::ios_base::unitbuf);
   }
 
 #if defined(GENERATING_DOCUMENTATION)
@@ -131,7 +131,7 @@
         basic_socket_streambuf<Protocol, StreamSocketService,
           Time, TimeTraits, TimerService> >::member)
   {
- tie(this);
+ this->setf(std::ios_base::unitbuf);
     if (rdbuf()->connect(x...) == 0)
       this->setstate(std::ios_base::failbit);
   }


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