You've not provided enough information here. We'd need to understand how your nsInputStreamPump is connected to the rest of Mozilla. You should also know that Gecko is sometimes going to request a CSS or JS file before it finishes parsing a HTML document. That means, that if you are streaming the HTML document, Gecko might stop reading from that stream and start trying to load a CSS or JS file. If you require all data to go over a single pipe, then you will need to buffer the rest of the HTML document. Again, without really understanding what you are doing, there is little I can do to help.

-Darin



Vladimir Marek wrote:

Hello,

I created protocol handler which can transport files through 'tunnel'. Tunnel is network protocol which can send bytes from mozilla and back, however has three disadvantages:
a) It has to be opened before sending first request and has to stay opened for all requests
b) There can be opened maximally one tunnel at a time for one program
c) The tunnel can transport maximally one file at a time


So I did derived class from nsIInputStream, which share one global mutex, which block other input streams while one did not finished the transport. The blocking is done in method nsIInputStream::Read. To make this asynchronous I used InputStreamPump in the channel which uses my Stream.

I'm testing this on transferring html file containing big images. Mozilla first asks for the html file, then for all images, but only the first one is transported, then the second, etc. However, when the images are large and there is plenty of them (>4), mozilla asks for next image during the time when InputStreamPump calls ::Read on my input stream. New InputStream is created, it sleeps in the method ::Read, but also the stream which was actually transferring data stops to do anything. No more calls to ::Read. Looks like the InputStreamPump stops working.

I know this is not very clear description of the problem, but I don't know how to describe it better :)

Any ideas what's going on, please ?
_______________________________________________
Mozilla-netlib mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-netlib


_______________________________________________
Mozilla-netlib mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to