returning info from streams in libwww
Subject: returning info from streams in libwww
From: "Tom Gaskins" <email@example.com>
Date: Wed, 6 Dec 1995 11:21:03 -0800
From firstname.lastname@example.org Wed Dec 6 14: 21:09 1995
X-Mailer: Z-Mail (3.2.0 06sep94)
Is there a best way for a stream to return information to the original request
generator? In particular, I need to have a converter stream pass back a file
name to the application, preferably via the request class itself.
I could just have the stream call the application to convey such information,
but in a threaded situation I'd need to match asynchronous calls with active
requests. Ideally (I think) the stream would be able to add information to the
request that the application could look for after loading if certain other
conditions (success, content type, etc.) apply . Perhaps via something like the
error stack, with each stream in a cascade able to push info onto stack.
Alternatively, the application could pass parameters to the streams (perhaps
via the request), similar to the client-data parameter of Xt callbacks. But I
don't see any way to do this now short of defining the request's OutputStream
and passing the parameters during the creation of that (and I'm still uncertain
as to what the purpose and ramifications of specifying a request's OutputStream
are, vs. defining a converter).
Anyway, is there a good way to communicate between the application and streams?
BTW: I'm really enjoying the new 4.x architecture.