Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot access private nsp property on sockets #16

Open
dbuschtoens opened this issue Jul 14, 2023 · 0 comments
Open

Cannot access private nsp property on sockets #16

dbuschtoens opened this issue Jul 14, 2023 · 0 comments

Comments

@dbuschtoens
Copy link

According to the documentation, you should be able
to access the namespace of a socket with socket.nsp

io.of(/^\/dynamic-\d+$/).on("connection", (socket) => {
  const namespace = socket.nsp;
});

However, in the Deno implementation of the Socket.IO server, this fails with Property nsp is private and only accessible within class 'Socket'..

This is because it is defined as readonly private in socket.io-deno while in socket.io it is just readonly.

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

No branches or pull requests

1 participant