-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description
Hi, guys! Thanks for you initiative, appreciate it.
I'm just wondering there are any plans to support onAny callback on the server side? NodeJs Server API's already supported this feature -> catch-all listener.
Use Case
As far as I understand the current implementation greatly depends on eventName. But one might consider the case when socketIO endpoint doens't really know how to handle(and deserialize) the particular event, but sends it further down to the target backends which will undestand and parse the particular event.
Proposed Solution
there is already EventInterceptor API, but it won't be triggered unless the corresponding event-listener exist, because of that - https://github.com/socketio4j/netty-socketio/blob/main/netty-socketio-core/src/main/java/com/socketio4j/socketio/namespace/Namespace.java#L161
is it possible to let an interceptor run without any registered event-listener?
Alternatives Considered
As a workaround one can consider defining kind of meta-event, which in turns will contain other type field in the event data. based on that type one can differentiate what's actually happening.