2

I am trying to use default namespace '\' for connecting general android application sockets with Socket.io , but I want to make custom namespace for website like '/web' but when client with io.connect('/web') it connects to default namespace.

basically i want authorization of all, but not for /web namespace.
here is my code

io.sockets.on('connection', function (socket, next) {
  //some handshaking data to varify connection
}

io.of('/web').on('connection', function(socket, next) {
  //HERE i want to SKIP verification
}


but I got request on default instead of /web.
1
  • Could you please update the post with the code? Commented Mar 1, 2016 at 5:56

1 Answer 1

1

socket.io connection event will trigger for /default namespace on all socket connections.

Later events from the client will only trigger on the namespace you are connected to.

Sign up to request clarification or add additional context in comments.

1 Comment

Do you have any documentation for this statement? I found a problem like this in my socket but I'm not sure

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.