Skip to content

Can't connect to namespace on specified socket #1029

@NagRock

Description

@NagRock

You want to:

  • report a bug

Current behaviour

As documentation says, to connect to namespace i should use:
var socket = io('/my-namespace');

But since io (or connect) method is global I can't specify on which socket I want to connect to namespace. For example:

var firstSocket = io('localhost');
var secondSocket = io('localhost');
var namespace = io('localhost/myNamespace');

I can't define if myNamespace connection should go through first or second socket.

Expected behaviour

I think it should be like that:

var firstSocket = io('localhost');
var secondSocket = io('localhost');
var firstSocketNamespace = firstSocket.connectNamespace('myNamespace');
var secondSocketNamespace = secondSocket.connectNamespace('myNamespace');

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