Closed Jakobud closed 9 years ago
Code looks good. Can you beef up the docs in the header and README to explain this.
Done!
Awesome. I'm seeing some merge conflicts. Can you make sure you are up to date with origin master.
I think I fixed the merge conflicts. Good to go I think!
Merged, thanks!
automaticOpen
(true/false) option. Determines whether or not the socket will be created and connect automatically upon instantiation or not.connect()
to publicly availableopen()
. Now the user can manuallyclose()
andopen()
the connection if they desired to.open()
function to useself.url
instead ofurl
, allowing a user to change theurl
if they want. So a user couldclose()
, then change the URL to another websocket URL, thenopen()
. 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 manuallyopen()
andclose()
the connection at will.automaticOpen
istrue
by default which is the current behavior.