socketio / socket.io-admin-ui

Admin UI for Socket.IO
https://admin.socket.io
MIT License
358 stars 95 forks source link

Multiple namespaces #6

Closed heynikhil closed 3 years ago

heynikhil commented 3 years ago

We have an option like give namespace,

instrument(global.io, {
    auth: false,
    namespaceName: '/',
});

What if we have dynamic namespaces?

darrachequesne commented 3 years ago

Arf, that's a good remark.

Dynamic namespaces are currently not supported, since we register event listeners only once when calling instrument(): https://github.com/socketio/socket.io-admin-ui/blob/ad0ec0de08139e0c88a8b432fe94d3822363580a/lib/index.ts#L389

Two possible solutions:

darrachequesne commented 3 years ago

This should be fixed by https://github.com/socketio/socket.io-admin-ui/commit/74f1c20f6ad878c3d11c5fc80dd8d12ee02d7bfb, included in version 0.1.2.