Annotation of libwww/Library/src/WWWStream.html, revision 2.4

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.3       frystyk     3:   <!-- Changed by: Henrik Frystyk Nielsen, 16-Apr-1996 -->
                      4:   <TITLE>W3C Reference Library libwww Streams</TITLE>
2.1       frystyk     5: </HEAD>
                      6: <BODY>
2.3       frystyk     7: <H1>
                      8:   Declaration of W3C Reference Library Streams
                      9: </H1>
2.1       frystyk    10: <PRE>
                     11: /*
                     12: **     (c) COPYRIGHT MIT 1995.
                     13: **     Please first read the full copyright statement in the file COPYRIGH.
                     14: */
                     15: </PRE>
2.3       frystyk    16: <P>
                     17: The stream part of the Library is a set of streams that can be used in many
2.4     ! frystyk    18: contexts throughout the Library. It also contains conversions between streams
        !            19: and other memory containers, for example <A HREF="HTChunk.html">Chunks</A>.
2.1       frystyk    20: <PRE>
                     21: #ifndef WWWSTREAM_H
                     22: #define WWWSTREAM_H
                     23: </PRE>
                     24: <PRE>
2.2       frystyk    25: #ifdef __cplusplus
                     26: extern "C" { 
                     27: #endif
2.1       frystyk    28: </PRE>
2.3       frystyk    29: <H3>
                     30:   System dependencies
                     31: </H3>
                     32: <P>
2.2       frystyk    33: The <A HREF="sysdep.html">sysdep.h</A> file includes system-specific include
2.3       frystyk    34: files and flags for I/O to network and disk. The only reason for this file
                     35: is that the Internet world is more complicated than Posix and ANSI.
2.4     ! frystyk    36: <PRE>#include "sysdep.h"
2.1       frystyk    37: </PRE>
2.3       frystyk    38: <H3>
                     39:   Content Length Counter
                     40: </H3>
                     41: <P>
                     42: This stream also buffers the result to find out the content length. If a
                     43: maximum buffer limit is reached Content-Length is calculated for logs but
                     44: it is not sent to the client -- rather the buffer is flushed right away.
2.4     ! frystyk    45: <PRE>#include "<A HREF="HTConLen.html">HTConLen.h</A>"                 /* Content Length Counter */
2.3       frystyk    46: </PRE>
                     47: <H3>
                     48:   Content Guess Stream
                     49: </H3>
                     50: <P>
                     51: This interface provides functionality for guessing unknown media types from
                     52: magic words. The stream is a one that reads first a chunk of stuff, tries
                     53: to figure out the format, and calls <CODE>HTStreamStack()</CODE>. This is
                     54: a kind of lazy-evaluation of <CODE>HTStreamStack()</CODE>. This could be
                     55: extended arbitrarily to recognize all the possible file formats in the world,
                     56: if someone only had time to do it.
2.4     ! frystyk    57: <PRE>#include "<A HREF="HTGuess.html">HTGuess.h</A>"                   /* Guess stream */
2.3       frystyk    58: </PRE>
                     59: <H3>
                     60:   Tee Stream
                     61: </H3>
                     62: <P>
                     63: The Tee stream just writes everything you put into it into two oter streams.
                     64: One use (the only use?!) is for taking a cached copey on disk while loading
                     65: the main copy, without having to wait for the disk copy to be finished and
                     66: reread it.
2.4     ! frystyk    67: <PRE>#include "<A HREF="HTTee.html">HTTee.h</A>"                       /* T streem for splitting a stream */
        !            68: </PRE>
        !            69: <H3>
        !            70:   Stream to Chunk Conversion
        !            71: </H3>
        !            72: <P>
        !            73: If you do not like the stream model in libwww, then you can use this stream
        !            74: to convert a <A HREF="HTStream.html">stream object </A>into a
        !            75: <A HREF="HTChunk.html">Chunk object</A> which is a dynamic character string
        !            76: buffer in memory.
        !            77: <PRE>#include "<A HREF="HTSChunk.html">HTSChunk.h</A>"
2.3       frystyk    78: </PRE>
                     79: <H3>
2.4     ! frystyk    80:   Stream to Memory Object Conversion
2.3       frystyk    81: </H3>
                     82: <P>
                     83: This version of the stream object is a hook for clients that want an unparsed
                     84: stream from libwww. The HTXParse_put_* and HTXParse_write routines copy the
                     85: content of the incoming buffer into a buffer that is realloced whenever
2.4     ! frystyk    86: necessary. This buffer is handed over to the client in
        !            87: <CODE>HTXParse_free</CODE>.
        !            88: <PRE>#include "<A HREF="HTXParse.html">HTXParse.h</A>"                 /* External parse stream */
2.1       frystyk    89: </PRE>
                     90: <PRE>
                     91: #ifdef __cplusplus
                     92: } /* end extern C definitions */
                     93: #endif
                     94: 
                     95: #endif
                     96: </PRE>
2.3       frystyk    97: <P>
                     98:   <HR>
2.1       frystyk    99: <ADDRESS>
2.4     ! frystyk   100:   @(#) $Id: WWWStream.html,v 2.3 1996/06/01 17:46:57 frystyk Exp $
2.1       frystyk   101: </ADDRESS>
2.3       frystyk   102: </BODY></HTML>

Webmaster