Behaviour for namespace connect mechanism and connect_errors #4970
-
I'm implementing a socket.io server in rust and I'm currently adding middlewares to namespaces in order for the user to have authentication.
@darrachequesne do you have an opinion on this question? What solution is used on the official implementation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! In the official implementation, we first run all the middlewares and then the socket gets connected (your 1st solution): Lines 315 to 358 in bf64870
Else, a client could receive some data it should not be able to, isn't it? |
Beta Was this translation helpful? Give feedback.
Hi!
In the official implementation, we first run all the middlewares and then the socket gets connected (your 1st solution):
socket.io/lib/namespace.ts
Lines 315 to 358 in bf64870