【发布时间】:2011-06-24 12:12:12
【问题描述】:
我正在使用 here 找到的 fastCGI 应用程序。
代码中有如下注释:
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.
我对 C++ 流的了解相当薄弱。有人可以解释一下:
- 评论中提到了哪些流缓冲区?
- 在什么情况下流缓冲区的缓冲区大小不为零?
最后但并非最不重要的一点是,有人可以指出在线资源(双关语),它提供了对 C++ IO 流的清晰而温和的介绍?
【问题讨论】:
-
streambuf 参考:cplusplus.com/reference/iostream/streambuf