Hi again,
I think I understand now. Could you verify? Having looked at
nsFileChannel, I think what I need to do is:
1. implement an nsIOutputStream that writes to JNI.
2. add a flag to my channel which gets set to true if SetUploadStream
is called.
3. in AsynchOpen check the flag. If true, create an output transport
using nsIStreamTransportService and do a copy from input to output
stream using nsIAsyncStreamCopier.
Am I on the right track?
cheers,
Andrew
On 23 Nov 2005, at 23:35, Christian Biesinger wrote:
(the netlib mailing list would've been better, btw)
Andrew Harrison wrote:
I've written a protocol handler for a protocol which is based on an
input stream. If this protocol allows sending data as well, via an
output stream, then I'm not sure how this works, for example if I
wanted firefox to understand the protocol scheme from an html form.
Do I need to write an nsITransport implementation? If so, how are
these transports registered with firefox?
No, uploads don't work via nsITransport; transports are for things
like direct socket I/O. It should be enough for you to implement
nsIUploadChannel on the channel that newChannel returns.
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom