tracker issue : CF-3345377

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: WebSocket's onClose receives connectionInfo arg so onOpen should too

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 10/12/2012

Components: Web Socket

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final / 286070

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

cfwebsocket's onClose() currently receives the connectionInfo struct as its argument. The onOpen() does not.

This struct is already available on the WebSocket JavaScript object and should be passed to onOpen for consistency with onClose.

The doc says onOpen and onClose require no argument. This is still true. The argument would remain optional. For clarity, the doc should just say that onOpen and onClose receive a connectionInfo argument containing details of the WebSocket connection.

(Code attached. Code includes repro for #3342986.)

The following comments are in the code:

1) Regarding openConnection/closeConnection: Doc says closeConnection() returns true upon successful completion. Doc also says that authenticate/subscribe/publish/invokeAndPublish/getSubscriberCount/getSubscriptions/openConnection/isConnectionOpen/closeConnection/unsubscribe all return boolean. Thus, openConnection & closeConnection should return boolean on successful completion (instead of undefined).

2) Regarding onOpen/onClose: The connectionOptions struct is already available on the WebSocket object. So there is no reason to prevent onOpen() from receiving the same connectionOptions argument that onClose() currently receives. The connectionOptions argument should be added to onOpen().

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3345377

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

  1. October 12, 2012 00:00:00: 1_OnOpenShouldReceiveSameArgAsOnClose.zip

Comments:

Nimit - Can you verify this?
Comment by Vamseekrishna N.
17579 | May 26, 2013 10:04:15 PM GMT
Awdhesh, can you take a look?
Comment by Rupesh K.
17580 | September 05, 2013 11:38:41 PM GMT