nsIChannel derives from nsIRequest which defines a Cancel method.
Darin
Rick Marvin wrote:
> My event loop which is performing the download resides in a child thread.
> In some cases, after invoking a call to nsIChannel::asyncRead, I have a need
> to stop the download of a url prior to it completing. I am uncertain how
> to get at a nsOnStopRequestEvent and post it to the eventqueue on my child
> thread. I only have access to the channel, my receiver (inherits from
> nsIStreamListener), and my URLLoadInfo. Any suggestions on how to cleanly
> stop the download?
>
> Kind Regards,
>
> Rick Marvin