Boris Zbarsky wrote:
> ksachdeva wrote:
> > * YExt then invokes the AsyncOpen method of my channel.
>
> And passes in an nsIStreamListener, right?
>

Yes.

> > I now want to pass back to YExt but do not know how to do it.
>
> You call OnStartRequest/OnDataAvailable/OnStopRequest on the listener passed 
> to
> AsyncOpen.
>

I am doing that already but thats not what I am asking.

* In the write method of my OutputStream class I invoke my method
passing it the required data. This method also returns some data which
I now want to pass back to YExt but do not know how to do it.

NS_METHOD
nsMyOutputStream::Write(const char* aBuf,PRUint32 aCount,PRUint32*
_retval)
{
    char* returnData = ExchangeData(aBuf);

    return NS_OK;
}

I basically want to return "returnData" back to YExt from
nsMyOutputStream::Write. Note that I have not passed IStreamListener to
nsMyOutputStream. Are you suggesting that I pass the listerner object
from AsynOpen method to nsMyOutstream and invoke OnDataAvailable from
nsMyOutStream::Write method ???..... Isn't Write method invoked on
separate thread ?

Regards & thanks
Kapil 


> -Boris

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

Reply via email to