Logo Search packages:      
Sourcecode: xulrunner version File versions

void nsIRequest::cancel ( in nsresult  aStatus  )  [inherited]

Cancels the current request. This will close any open input or output streams and terminate any async requests. Users should normally pass NS_BINDING_ABORTED, although other errors may also be passed. The error passed in will become the value of the status attribute.

Implementations must not send any notifications (e.g. via nsIRequestObserver) synchronously from this function. Similarly, removal from the load group (if any) must also happen asynchronously.

Requests that use nsIStreamListener must not call onDataAvailable anymore after cancel has been called.

Parameters:
aStatus the reason for canceling this request.
NOTE: most nsIRequest implementations expect aStatus to be a failure code; however, some implementations may allow aStatus to be a success code such as NS_OK. In general, aStatus should be a failure code.


Generated by  Doxygen 1.6.0   Back to index