[Prev][Next][Index][Thread]
Using HTTee stream.
-
To: www-lib@w3.org
-
Subject: Using HTTee stream.
-
From: fiorenti@cli.di.unipi.it (Giacomo Fiorentini)
-
Date: Fri, 8 Mar 96 00:04:37 +0100
-
From fiorenti@cli.di.unipi.it Thu Mar 7 18: 02:37 1996
-
Message-Id: <9603072304.AA09380@cirano.cpr.it>
-
X-Mailer: Windows Eudora Version 1.4.4
-
X-Sender: fiorenti@cirano.cpr.it (Unverified)
Hi,
I want to know how I can set up the right output stream for a
request, that just save and parse one URL.
I want to use the HTTee stream to perform this tasks :
- the first stream must save the hardcoded URL to a file
- the second stream must parse (HTML) URL's content to perform other
tasks, using HText interface.
stream HTTee stream 1
======>=========stream from network=====>=======*=========>========save locally
|
| stream 2
|=========>========HTML parsing
--------------------------------------------------------------------------------
For example :
... declaration ( global, local, HText ecc.. ) .....
FILE * fp ;
HTRequest * request = NULL;
HTList * conv = NULL ;
conv = HTList_new () ;
HTLibInit (....,.... );
HTProtocol_add ( ....... ) ;
.... other statements .....
fp = fopen ( "dummy","w"); /* no check for semplicity */
request = HTRequest_new () ;
HTRequest_setMethod ( request, METHOD_GET ) ;
/* !!!!!!!!!!!!!!!! */
HTRequest_setOutputStream ( request,
HTTee ( HTFWriter_new ( request, fp, NO ) /* is
this right ?? */ ,
/* ??????? and here ???? */ ,
NULL
)
)
.... ecc.....
HTLibTerminate () ;
-------------------------------------------------------------------------------
Can you help me ?
Thanks.
PS: I'm using the library version 4.0D.
----------------------------------------------------------------------------
--------
Giacomo Fiorentini
/\
Pisa University
/00\
fiorenti@cli.di.unipi.it
\gf/
+39 050-544560
\/
----------------------------------------------------------------------------
--------
Follow-Ups: