Re: Is there a buffered tcp stream in ASIO?
"Mohammad Nejati \[ashtum\] via Boost-users" <[email protected]> Mon, 29 Apr 2024 22:18:18 +0330
| Newsgroups | gmane.comp.lib.boost.user |
|---|---|
| Message-ID | <CAEnKN-QAGsPt_5JqCzRO7wXZORQtbS=kWNDTUV4jPLrJZ4AB9g@mail.gmail.com> |
You just need to disable automatic flushing: s1 << std::nounitbuf; // or s1.unsetf(std::ios_base::unitbuf); https://en.cppreference.com/w/cpp/io/manip/unitbuf By the way you can call connect directly on s1 no need to take a reference.