Next Previous Contents

3. Buffering (a discussion)

It is in the nature of the CGI and the ISAPI interface that both are different if you like to use own file buffers. CGI got it's data from environment QUERY_STRING or from STDIN. If you use environment you've to remember its size. By default environment size for Standard CGI calls is set to 8kB in the server configuration. If you read from STDIN you can read data into buffers to decrease memory needs of Perl but you cannot immediate control the server buffers.

The ISAPI interface supports better control of buffers. If you look at the above Delphi example you'll see that ReadClient function gives you the possibility to read either buffer size bytes or the ready bytes to read.


Next Previous Contents