Skip to content

Socket io v2 to v3: Default namespace is not connected anymore #4953

Answered by darrachequesne
SamTV12345 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

This is indeed a pretty big change when migrating from v2 to v3.

You should be able to register the middleware on your other namespace:

io.of("/my-other-namespace").use(sessionMiddleware);

Reference: https://socket.io/docs/v4/server-api/#namespaceusefn

See also: https://socket.io/how-to/register-a-global-middleware

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@SamTV12345
Comment options

@darrachequesne
Comment options

@SamTV12345
Comment options

@darrachequesne
Comment options

@SamTV12345
Comment options

Answer selected by SamTV12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants