-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Dynamic Namespaces #212
Comments
It is not planned for the moment. I'll do some research on it and maybe propose directions for anyone who would like to work on it. |
Is it possible to work around this issue by using custom Middleware in axum or socketioxide to intercept the connection request and create a namespace with Or maybe preflight a connection attempt on the path "/", create the namespace there, and connect a second time then to the namespace, even though that seems quite cumbersome |
At any time you can debug the io struct and you should be able to get the map of the current registered namespaces. I don't think I'll implement regex based matching or function base matching. If the user add a bad regex or a long-computation function it would slow down routing. I'd like to go the "axum-way" and use the matchit crate. If anyone would like to work on this issue :
|
matchit router does not allow iterating through or deleting paths only getting them. to minimize downstream changes a new type `ClientNs` is introduced. it holds a hashset of paths and the router itself closes Totodore#212
matchit router does not allow iterating through or deleting paths only getting them path extractors and new struct `ClientNs` which holds a hashset of paths and the router itself are introduced closes Totodore#212
We need to have node removal feature to use the matchit router : ibraheemdev/matchit#44 as found by @brandonsimpson21. |
Do we have nodes in Socketioxide? |
you cannot remove nodes with the matchit router, but you could use the active nodes to recreate the router on node deletion or verify the nodes active beforehand. |
It is a solution that is quite convoluted. I'll try to propose a PR for node removal for the matchit router before thinking about alternative solutions. |
@Totodore can we go the regex route and leave the case of engine slowing down due to bad regex upto the user 😄 |
Merged and released with matchit 0.8.2 |
I have noticed that dynamic namespaces via regex are not yet implemented. Is this planned?
Is there a way for custom middleware to handle this in the meantime?
The text was updated successfully, but these errors were encountered: