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
