Skip to content

Cannot access private nsp property on sockets #16

Closed
@dbuschtoens

Description

@dbuschtoens

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions