Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Questions About Async Stream Listeners

4 views
Skip to first unread message

us...@domain.invalid

unread,
Nov 20, 2006, 10:40:56 AM11/20/06
to
I note that with both async input and output streams, a registered
listener has a single callback method and that this method gets called
if either the stream is "ready" or it has been "closed".

(a) From inside the callback routine, how can one tell if the callback
trigger is "ready" or closed"? I suppose that with an input stream, one
could call the stream's available() method and if 0 is returned, could
assume that a "close" has been signaled. However, how would one do this
with an output stream? Or is there some better way all-together?

(b) Can there be more than one registered listener on a single async
stream? It just seemed in my experiments that I could not register twice
and actually get 2 callbacks.

Thanks.

0 new messages