Skip to content

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

Closed
@buzzshiva

Description

@buzzshiva

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/");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions