-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add allEvent listener to emitter #99
Labels
Comments
It seems the position was to mimic the JS client, which does not handle wildcards: socketio/socket.io-client-java#243 (comment). I'm not sure whether it has changed since then. |
You're right. As the js client does not implement the wildcard case, the java client has no intend to do that. |
Hi, JS client has .onAny() now, maybe you'll reconsider adding something like that? 🙂 |
darrachequesne
added a commit
to socketio/socket.io-client-java
that referenced
this issue
Jul 8, 2022
Syntax: ```java socket.onAnyIncoming(new Emitter.Listener() { @OverRide public void call(Object... args) { // ... } }); socket.onAnyOutgoing(new Emitter.Listener() { @OverRide public void call(Object... args) { // ... } }); ``` Related: - socketio/engine.io-client-java#99 - #243 - #475
cedev935
added a commit
to cedev935/socket-java
that referenced
this issue
Sep 14, 2023
Syntax: ```java socket.onAnyIncoming(new Emitter.Listener() { @OverRide public void call(Object... args) { // ... } }); socket.onAnyOutgoing(new Emitter.Listener() { @OverRide public void call(Object... args) { // ... } }); ``` Related: - socketio/engine.io-client-java#99 - socketio/socket.io-client-java#243 - socketio/socket.io-client-java#475
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm using socket.io java client for my android application. My application (1) is a wrapper of another application (2) that listens to socket.io events. From the view of my wrapper application, I don't know the list of specific events that the application (2) listens to. However, I need to access to the returned params of the registered event handlers of the application (2).
Hence I wonder if we can add a special event, e.g.
*
, that once it's registered byEmitter.on("*", callback)
, will transfer the response of all event to the*
event callback ?Regarding to the source code, I found out that it's easy to do so by just adding some line of code in the
Emitter
:What do you think if it's possible to do that ?
Thanks for any help.
The text was updated successfully, but these errors were encountered: