From b0e2dda829db4560e2c0ed7556803124a396b89f Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 07 Mar 2005 21:04:49 +0000 Subject: prebuffering of output is controllable now. --- (limited to 'include') diff --git a/include/sitecing/sitecing_interface_cgi.h b/include/sitecing/sitecing_interface_cgi.h index cab947c..da538d6 100644 --- a/include/sitecing/sitecing_interface_cgi.h +++ b/include/sitecing/sitecing_interface_cgi.h @@ -36,7 +36,15 @@ namespace sitecing { /** * Here is where we prebuffer output. */ - ostringstream prebuffer; + stringbuf prebuffer; + /** + * Output stream, initially going to prebuffer. + */ + ostream outs; + /** + * Have headers been sent yet? + */ + bool headers_flushed; /** * Pointer to the sitespace object. */ @@ -48,13 +56,26 @@ namespace sitecing { sitecing_interface_cgi(sitespace *s); /** - * @todo TODO: wish I could remember -- document me. + * Set up interface for the (possibly, new) cgi gateway object, + * reset headers, empty buffer, etc. */ void prepare(kingate::cgi_gateway *cg); /** - * @todo TODO: wish I could remember -- document me. + * Flush output stream. + */ + void flush(bool keep_buffering=false); + /** + * Send headers to the output stream, if we haven't yet. + */ + void flush_headers(); + /** + * Are we buffering now? + */ + bool is_buffering(); + /** + * Control output buffering. */ - void flush(); + void set_buffering(bool do_buffer); }; } -- cgit v0.9.0.2