miguelgrinberg / Flask-SocketIO

Socket.IO integration for Flask applications.
MIT License
5.36k stars 890 forks source link

Namespace catch-all handling of connect/disconnect events #2062

Closed mooomooo closed 4 months ago

mooomooo commented 5 months ago

Is your feature request related to a problem? Please describe. I'd like to use dynamic namespaces, i.e. my server should respond to a client that connects on any arbitrary namespace. For that, the connection handler needs to accept and handle all namespaces with the '*' catch-all.

Describe the solution you'd like The namespace catch-all mechanism should apply to all event handlers.

Additional context

The connect and disconnect handlers are not dispatched to catch-all handlers, only user-defined events are.

Originally posted by @miguelgrinberg in https://github.com/miguelgrinberg/Flask-SocketIO/issues/2061#issuecomment-2094248770

mooomooo commented 4 months ago

Fixed as of https://github.com/miguelgrinberg/Flask-SocketIO/commit/f4ebcc798df28a0b9c91eb0b53ec3754a3ecdb3e