Re: Library architecture

On Tue, 1 Aug 1995, Mark Friedman wrote:
> I'm a little confused about the library architecture. I see how to do
> the "hard" stuff but not how to do the "easy" stuff. For example, if
> I just want to get the raw source for an http request and write it to
> a socket what functions do I need to override to get the minimal amount
> of stuff loaded from the library?

I went through the same process you did, all I wanted to do was use libwww
to simply retrieve files via http, and give them to me unmunged. It turns
out that by far the easiest way to do this is to simply build the linemode
browser www, and fork it off with a -source flag. I.e something like...

  fp = popen("www -source <URL>", "r")

Then read the contents of the URL from the file stream.

Obviously it would run a bit faster if you did not have to fork and do all
the www startup for each retrieval, but the over-head is really not that
bad, and it was not worth it for me to try and figure out how to integrate
it.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
= Matthew M. Freedman                                                 =
= U. of Washington Information Systems       mattf@cac.washington.edu =
= 4545 15th Ave. NE; 3rd Floor               (206) 543-5593           =
= Seattle, WA  98105                                                  =
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Received on Tuesday, 1 August 1995 16:56:17 UTC