Hello sir,

Thanks a lot for the reply.

If async open is getting called  and we pass the nsIStream Listener
interface pointer to it (Please note that .nsIStreamListener inherits from
nsIRequestObserver and has methods like OnStartRequest and OnStopReuqest.),
Somewhere down the line it has to call OnStartRequest method of
nsIRequestObserver Interface.

when we call asyncopen of HTTPChannel. we pass the Object nsDocumentOpenInfo
Object  which inherits from nsIStreamListener.

Furthur down the line when i try to trace the function call sequence i could
find the function call to OnStopRequest Method of nsDocumentOpenInfo Object
(in the fuction ResponseCompleted of nsHTTPChannel). nsDocumentOPenInfo
Object is the StreamListener in this case.
 But before that OnStartRequst method has to be called which i am unable to
find. Thats why i thought that i am in the wrong place. Can u please guide
me as to where the function OnStartRequest Method of nsDocumentOPenInfo
Object is being called.
Am i missing something??

Eagerly awaiting reply.

Thanks in advance

Pras


----- Original Message -----
From: "Darin Fisher" <[EMAIL PROTECTED]>
Newsgroups: netscape.public.mozilla.netlib
To: "Anandprasanna Gaitonde" <[EMAIL PROTECTED]>
Sent: Tuesday, 05 June, 2001 11:28 AM
Subject: Re: Regarding nsHTTPChannel


> 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
>



Reply via email to