The CResponse::setBuffer function sets the value of the Buffer property.
bool buffering // containing the new Buffer value
Upon successful completion, zero is returned. Otherwise, a value of non-zero is returned.
A boolean value that contains the new Buffer value.
This function sets the current value of the Buffer property of the object. When page output is buffered , the server does not send a response to the client until all of the server scripts on the current page have been processed, or until the CResponse::flush, CResponse::end or CResponse::exit function has been called.
The Buffer property cannot be set after the server has sent output to the client. For this reason, the call to this function should be done before the CResponse::begin function is invoked.
Under Ch-CGI debug mode with the first line of a Ch-CGI code as
#!/bin/ch -g, this setting has no effect.
The function of CResponse::getBuffer can retrieve the current value of the Buffer property of the object.
Differences Between Ch-CGI and Ch-ASP
In Ch-CGI, the output is not buffered by default. In Ch-ASP, the output is buffered by default.
CResponse, CResponse::getBuffer, CResponse::flush, CResponse::end, CResponse::exit