1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| package com.nq.ws.client;
|
| import io.socket.emitter.Emitter;
|
| public class On {
|
| private On() {}
|
| public static Handle on(final Emitter obj, final String ev, final Emitter.Listener fn) {
| obj.on(ev, fn);
| return new Handle() {
| @Override
| public void destroy() {
| obj.off(ev, fn);
| }
| };
| }
|
| public interface Handle {
|
| void destroy();
| }
| }
|
|