Instead of using tie(), set the ios_base::unitbuf flag to force the stream to be flushed after every insertion.
This commit is contained in:
parent
1afef34c9a
commit
854d019a58
@ -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); \
|
||||
} \
|
||||
@ -111,7 +111,7 @@ public:
|
||||
basic_socket_streambuf<Protocol, StreamSocketService,
|
||||
Time, TimeTraits, TimerService> >::member)
|
||||
{
|
||||
tie(this);
|
||||
this->setf(std::ios_base::unitbuf);
|
||||
}
|
||||
|
||||
#if defined(GENERATING_DOCUMENTATION)
|
||||
@ -130,7 +130,7 @@ public:
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user