Skip to content

how do i get a new instance of socket.io-client #437

@jfromaniello

Description

@jfromaniello

I am trying to write an integration test in node (not the browser). So, I need to connect two socket clients to the same server..

If i do something like:

var sio = require('socket.io-client');
var s1 = sio.connect("http://localhost:123123");
var s2 = sio.connect("http://localhost:123123");

It seems that they are the same instance or something alike, because the "connect" event is invoked once, and after that the two instances has .socket.connected = true

Is there a way to do this? thanks

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