Boost C++ Libraries: Ticket #5133: Iostreams code_converter buffer https://svn.boost.org/trac10/ticket/5133 <p> I've been working on converting a the fastcgi++ library over to using boost::iostreams from std::iostreams and I've noticed some peculiarities that I can't seem to work passed. </p> <p> For one, how do you change the buffer size of the code_converter adaptor? The built in facilities don't seem to actually do anything. I am adding to a filtering_stream and have noticed that for the following statements... </p> <p> stream.push(code_converter&lt;<a class="missing wiki">MyDevice</a>&gt;(myDevice), 8192); stream.push(code_converter&lt;<a class="missing wiki">MyDevice</a>&gt;(myDevice, 8192)); stream.push(code_converter&lt;<a class="missing wiki">MyDevice</a>&gt;(myDevice, 8192), 8192); </p> <p> All result in a buffer of 128 bytes. I can't figure out a way to actually change it. I've been monitoring what is going in the myDevice and it is always 128 byte chunks (or less). If I remove the code_converter from the stream and go directly in myDevice as per </p> <p> stream.push(myDevice, 8192); </p> <p> the buffer is sized as I want it to be and myDevice receives chunks of data maxing at 8192 bytes. </p> <p> Secondly, when using the statement </p> <p> stream.push(code_converter&lt;<a class="missing wiki">MyDevice</a>&gt;(myDevice, 8192)); </p> <p> code_converter calls not <a class="missing wiki">MyDevice</a>(const <a class="missing wiki">MyDevice</a>&amp;) for copying constructing the object but for some reason <a class="missing wiki">MyDevice</a>(const <a class="missing wiki">MyDevice</a>&amp;, const long int&amp;). What is that? Why is code_converter looking for such a constructor when I specify a buffer size for the code converter? </p> <p> Thirdly, I can not for the life of me make the code converter flush it's data. If I call a stream.strict_sync() should the code_converter not get flushed as well? It doesn't. Everything else in the chain does but the code_converter won't fully flush until destruction. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5133 Trac 1.4.3 anonymous Thu, 27 Jan 2011 19:29:55 GMT keywords changed https://svn.boost.org/trac10/ticket/5133#comment:1 https://svn.boost.org/trac10/ticket/5133#comment:1 <ul> <li><strong>keywords</strong> sync iostreams added; I've been working on converting a the fastcgi++ library over to using boost::iostreams from std::iostreams and I've noticed some peculiarities that I can't seem to work passed. For one how do you change the size of the adaptor? The built in facilities don't seem to actually do anything. I am adding to a filtering_stream and have noticed that for the following statements... stream.push(code_converter&lt;MyDevice&gt;(myDevice) 8192) stream.push(code_converter&lt;MyDevice&gt;(myDevice 8192)) stream.push(code_converter&lt;MyDevice&gt;(myDevice 8192) 8192) All result in a of 128 bytes. I can't figure out a way to actually change it. I've been monitoring what is going in the myDevice and it is always 128 byte chunks (or less). If I remove the from the stream and go directly in myDevice as per stream.push(myDevice 8192) the is sized as I want it to be and myDevice receives chunks of data maxing at 8192 bytes. Secondly when using the statement stream.push(code_converter&lt;MyDevice&gt;(myDevice 8192)) calls not MyDevice(const MyDevice&amp;) for copying constructing the object but for some reason MyDevice(const MyDevice&amp; const long int&amp;). What is that? Why is looking for such a constructor when I specify a size for the code converter? Thirdly I can not for the life of me make the code converter it's data. If I call a stream.strict_sync() should the not get flushed as well? It doesn't. Everything else in the chain does but the won't fully until destruction. removed </li> </ul> Ticket