C++ streams question (explanation of comment in code)

Posted by skyeagle on Stack Overflow See other posts from Stack Overflow or by skyeagle
Published on 2011-02-09T22:59:36Z Indexed on 2011/02/09 23:25 UTC
Read the original article Hit count: 209

Filed under:
|
|

I am playing around with the fastCGI application found here.

The following comment is in the code:

    if (content) delete []content;

    // If the output streambufs had non-zero bufsizes and
    // were constructed outside of the accept loop (i.e.
    // their destructor won't be called here), they would
    // have to be flushed here.

My knowledge of C++ streams is rather weak. Could someone please explain the following:

  1. which streambufs are being referred to in the comment?
  2. under what conditions would the streambufs had non-zero bufsizes?

last but not the least, can someone point to a resource (pun intended) online that provides a clear but gentle introduction to C++ IO streams?

© Stack Overflow or respective owner

Related posts about c++

Related posts about stream