Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update docs with 'force new connection' #607

Open
jareddlc opened this Issue · 8 comments

8 participants

@jareddlc

I could not find listed in the docs {'force new connection': true } option for socket create. Should also specify that this option is set to false by default.

usage:

var socket = io.connect(URL, {'force new connection': true });
@marqu3z

+1
Is a weird name for a flag option. Feels like it could be changed in the future. Definitely should be documented!

@bazineta

Appears to now be 'forceNew' in the 1.0 candidate.

However, I'm a bit puzzled by the usage. Found I needed to use this in the following scenario:

io.connect()
socket.disconnect()
io.connect()

That second connect() will just hang if 'forceNew: true' isn't used, which seems quite odd. I mean, we manually disconnected it, why is the library still trying to use it?

@pitambar

it worked for me, socket = io.connect(socketUrl,{'forceNew': true });

@manast

both forceNew and 'force new connection' should work. But it should definitively be documented somewhere...

@peteruithoven

Isn't this one pull request away guys...

@pitambar

@manast ya it should be documented

@AlexioVay

I agree. One question as I'm pretty new to socket.io and nodejs: How could you find out this command without documentation anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.