joewalnes/reconnecting-websocket — pull request #37 by Jakobud (2014-12-17 04:29:25+00:00)
Title: Added automaticOpen option. Determines whether or not the socket will be...

- Added `automaticOpen` (true/false) option. Determines whether or not the socket will be created and connect automatically upon instantiation or not.

- Also changed function `connect()` to publically available `open()`. Now the user can manually `close()` and `open()` the connection if they desired to.

Also changed the `open()` function to use `self.url` instead of `url`, allowing a user to change the `url` if they want. So a user could `close()`, then change the URL to another websocket URL, then `open()`. Ultimately a user would most likely just create a different ReconnectingWebSocket instance as that is a better solution and a better practice anyways, but this option was easy to add and probably a good idea to have in there now that a user can manually `open()` and `close()` the connection at will.

No backwards compatibility was broken with these changes, as `automaticOpen` is `true` by default which is the current behavior.