Hi, I am writing a custom protocol handler which is also used by an XPCOM extension. Like XmlHttpRequest uses the Http protocol handler my extension (YExt) used the XProtocol handler.
Here is what I have done: * YExt creates a channel by using the ioservice and my protocol scheme * My channel also implements IUploadChannel. * YExt invokes the SetUploadStream method of channel and supply the stream * YExt then invokes the AsyncOpen method of my channel. * Inside AsyncOpen, I use nsIStreamTransportService to create an output transport (CreateOutputTransport). I pass an instance of my own OutputStream class to CreateOutputTransport. I then call OpenOutputStream method on transport created. Finally I get nsIAsyncStreamCopier, invoke AsyncCopy method on it. This helps in invoking write method of my OutputStream class on a different thread. * 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. I tried to debug & understand the httpchannel code which use SocketTransport and SocketTransportService but not getting a good understanding. I would very much appreciate if you can give me directions on what should be done ??. I am definitely missing some concepts here. Regards & many thanks Kapil _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
