Skip to content
New issue

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

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

Already on GitHub? # to your account

Can we create socket instance by using socket = new io.Socket #496

Closed
buzzshiva opened this issue Aug 30, 2011 · 1 comment
Closed

Can we create socket instance by using socket = new io.Socket #496

buzzshiva opened this issue Aug 30, 2011 · 1 comment

Comments

@buzzshiva
Copy link

Can you let me know why the below case 1: doesn't work;
case 1:
var socket = new io.Socket('localhost', {port: 4000});
socket.connect();

but the case 2, works fine.
Case 2:
var socket = io.connect("http://localhost:4000/");

@rauchg
Copy link
Contributor

rauchg commented Sep 3, 2011

var socket = new io.Socket('localhost', {port: 4000}).of('')

should work.

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

No branches or pull requests

2 participants