Plus, something I really dont understand is, what is the use of nsLoadGroup? I see that in nsHttpChannel::AsyncOpen, the request will be added into the mLoadGroup, but I have no idea what's that for?
On Jul 3, 10:35 pm, ab bc <[email protected]> wrote: > Hi, > > I am trying to change the behavior of http, in the sense that, I want > http to use my own network codes. > > My network code input: > the url > > my network code output: > a buffer containing the html content > > my network code will work asynchronously, means somewhere in http > channel, a message containing the url will be sent to my network > thread/process, and later receive a message containing the data the > channel need. > > To do this, to my understanding, I have to replace http handler, http > channel at least. > > Main questions: > > 1. Is it possible I can change the existing http handler and channel > for this? I guess a good place could be the nsSocketTransportService ? > I am looking into whether I can create my own transport, somehow get > the url maybe through passing as parameter, and send it to my module. > After noticed by my network, call OnStartRequest of channel. > > 2. necko http is complicated, what could be the minimal interfaces I > have to support? Can I just support nsIProtocolHandler, nsIObserver, > nsIStreamListener? > Because outside codes(such as uriloader) could expect something more > which I dont implement? What if I just implement http the same way as > data protocol? > > 2. main thread + worker thread i > > I have seen a post similar to what I want to do: > > http://groups.google.com/group/mozilla.dev.tech.network/browse_thread... > > Do we have some solutions to this? _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
