Bug 769529 - Update nsIWebSocket*.idl comments to reflect that we don't always call OnStart. r=mcmanus, sr=biesi

This commit is contained in:
Jason Duell 2012-06-29 22:59:49 -07:00
parent 62837584c4
commit 684d005df2
2 changed files with 7 additions and 3 deletions

View File

@ -62,8 +62,7 @@ interface nsIWebSocketChannel : nsISupports
* to the socket listener as they arrive. The socket listener's methods
* are called on the thread that calls asyncOpen and are not called until
* after asyncOpen returns. If asyncOpen returns successfully, the
* protocol implementation promises to call at least onStart and onStop of
* the listener.
* protocol implementation promises to call at least onStop on the listener.
*
* NOTE: Implementations should throw NS_ERROR_ALREADY_OPENED if the
* websocket connection is reopened.

View File

@ -15,7 +15,12 @@ interface nsIWebSocketListener : nsISupports
{
/**
* Called to signify the establishment of the message stream.
* Any listener that receives onStart will also receive OnStop.
*
* Unlike most other networking channels (which use nsIRequestObserver
* instead of this class), we do not guarantee that OnStart is always
* called: OnStop is called without calling this function if errors occur
* during connection setup. If the websocket connection is successful,
* OnStart will be called before any other calls to this API.
*
* @param aContext user defined context
*/