ksachdeva wrote:
* 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.
Ah. You need to communicate this data to the rest of your code somehow,
basically. How you do it is sort of up to you.
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 ?
Yes to both. You'll need to proxy the call over to the right thread, of course.
For example, you could save the new data in some buffer and post an event to the
main thread. When the event fires, take the data and call OnDataAvailable on
the listener.
-Boris
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network