Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are multiple client connections supported? #318

Closed
andyuk opened this issue Oct 19, 2011 · 8 comments
Closed

Are multiple client connections supported? #318

andyuk opened this issue Oct 19, 2011 · 8 comments

Comments

@andyuk
Copy link

andyuk commented Oct 19, 2011

I am writing unit tests to test my socket.io server. It would be useful to be able to test multiple client socket connections in the same script. I am running the socket.io-client server side.

I've created 2 simple test scripts that show it is currently not possible:

https://gist.github.com/1297838

Obviously multiple socket connections within the browser wouldn't make any sense, but on the server-side I don't see why this shouldn't be possible.

Am I correct with my understanding? Do I need to run multiple Node.js processes if I want to run multiple socket-clients on the server-side?

Any help would be appreciated.

Andrew

@michetti
Copy link

Try this:
var socket = io.connect('http://localhost:3000', {'force new connection': true});

@andyuk
Copy link
Author

andyuk commented Oct 22, 2011

Excellent suggestion! I didn't know about that config option. I'll give it a try. Thanks for your help.

@michetti
Copy link

You are welcome.

@andyuk andyuk closed this as completed Dec 6, 2011
@simon-o-matic
Copy link

I love it when you get exactly the answer you are looking for. Thanks guys!

@JohnMcLear
Copy link

Thanks, totally forgot about this param.

@breath103
Copy link

thanks guys!

@mstdokumaci
Copy link

{'force new connection': true}
even this seems limited with 245 simultaneous connections.

@LoganathanB
Copy link

Thanks for the config suggestion {'force new connection': true}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants