|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79710 - trunk/boost/asio
From: chris_at_[hidden]
Date: 2012-07-23 19:52:15
Author: chris_kohlhoff
Date: 2012-07-23 19:52:15 EDT (Mon, 23 Jul 2012)
New Revision: 79710
URL: http://svn.boost.org/trac/boost/changeset/79710
Log:
Instead of using tie(), set the ios_base::unitbuf flag to force the stream to be flushed after every insertion. Refs #7162
Text files modified:
trunk/boost/asio/basic_socket_iostream.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Modified: trunk/boost/asio/basic_socket_iostream.hpp
==============================================================================
--- trunk/boost/asio/basic_socket_iostream.hpp (original)
+++ trunk/boost/asio/basic_socket_iostream.hpp 2012-07-23 19:52:15 EDT (Mon, 23 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