Anandprasanna Gaitonde wrote:
> HI all,
>
> I am tring to go thru the source code of the necko module.
> When i looked at nsHTTPChannel.cpp i found that class nsHTTPChannel does
> not implement the method asyncread of nsIHTTPChannel. But it does implement
> the method asyncopen of nsIChannel.
>
> The document "Writing a Protocol Handler" says that asyncread is called by
> the consumer to send a request towards the server.
> But for a HTTP request i think asyncopen gets called.
>
> Please let me know if i am wrong. I am finding it quite difficulty in
> understanding the source code
>
> Thanking in advance
>
> Regards
> Pras
>
>
>
In fact, nsIChannel (from which nsIHttpChannel inherits) has changed
relatively recently, and the online docs have yet to be updated to
reflect the change. AsyncOpen is called to being a URI load. A channel
exists for the purpose of loading a URI. Hope this helps...
Darin