(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.