Annotation of libwww/Library/src/WWWStream.html, revision 2.5
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.5 ! frystyk 57: <PRE>
! 58: #include "<A HREF="HTGuess.html">HTGuess.h</A>" /* Guess stream */
2.3 frystyk 59: </PRE>
60: <H3>
61: Tee Stream
62: </H3>
63: <P>
64: The Tee stream just writes everything you put into it into two oter streams.
65: One use (the only use?!) is for taking a cached copey on disk while loading
66: the main copy, without having to wait for the disk copy to be finished and
67: reread it.
2.5 ! frystyk 68: <PRE>
! 69: #include "<A HREF="HTTee.html">HTTee.h</A>"
! 70: </PRE>
! 71: <H3>
! 72: Merge Stream
! 73: </H3>
! 74: <P>
! 75: The Merge stream can be used to merge multiple streams into a single target
! 76: stream. The Merge stream does not prevent any of the streams from writing
! 77: and no ordering is imposed. The main feature is basically that the free and
! 78: abort methods can be called <B>n</B> times where <B>n</B> equals the number
! 79: of <I>feeds</I> that put data to the stream.
! 80: <PRE>
! 81: #include "<A HREF="HTMerge.html">HTMerge.h</A>"
2.4 frystyk 82: </PRE>
83: <H3>
84: Stream to Chunk Conversion
85: </H3>
86: <P>
87: If you do not like the stream model in libwww, then you can use this stream
88: to convert a <A HREF="HTStream.html">stream object </A>into a
89: <A HREF="HTChunk.html">Chunk object</A> which is a dynamic character string
90: buffer in memory.
2.5 ! frystyk 91: <PRE>
! 92: #include "<A HREF="HTSChunk.html">HTSChunk.h</A>"
2.3 frystyk 93: </PRE>
94: <H3>
2.4 frystyk 95: Stream to Memory Object Conversion
2.3 frystyk 96: </H3>
97: <P>
98: This version of the stream object is a hook for clients that want an unparsed
99: stream from libwww. The HTXParse_put_* and HTXParse_write routines copy the
100: content of the incoming buffer into a buffer that is realloced whenever
2.4 frystyk 101: necessary. This buffer is handed over to the client in
102: <CODE>HTXParse_free</CODE>.
2.5 ! frystyk 103: <PRE>
! 104: #include "<A HREF="HTXParse.html">HTXParse.h</A>" /* External parse stream */
2.1 frystyk 105: </PRE>
106: <PRE>
107: #ifdef __cplusplus
108: } /* end extern C definitions */
109: #endif
110:
111: #endif
112: </PRE>
2.3 frystyk 113: <P>
114: <HR>
2.1 frystyk 115: <ADDRESS>
2.5 ! frystyk 116: @(#) $Id: WWWStream.html,v 2.4 1996/06/28 16:31:38 frystyk Exp $
2.1 frystyk 117: </ADDRESS>
2.3 frystyk 118: </BODY></HTML>
Webmaster