I've got the error business sorted and I know what Async means just not
how to implement it. What about onDataAvailiable, the doco for
nsIStreamListner, the listener object passed to asyncOpen supposedly
implements this function. If i dont use that then how do I pass the
data to the listener?

I know that this code
(http://www.mozdev.org/source/browse/archangel/src/archangel-protocol.js?rev=1.3&content-type=text/x-cvsweb-markup)
isn't async but it supposedly works and they seem to use
onDataAvailiable.

    this.streamListener.onStartRequest (this, this.context);

    var len = str.length;
    this.stringStream.setData (str, len);
    this.streamListener.onDataAvailable (this, this.context,
                                         this.stringStream, 0, len);
    this.streamListener.onStopRequest (this, this.context,
                                       Components.results.NS_OK);

???

Boris Zbarsky wrote:
> James Newell wrote:
> > How do I do it then?
>
> Async.  Like post an event or set a timer or whatever.  When that fires, call
> onStartRequest/onStopRequest.
>
> But seriously, if you know in asyncOpen you have a problem, just throw from
> asyncOpen.
> 
> -Boris
>

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to