fix #7 getter for Manager(io)
This commit is contained in:
@@ -72,7 +72,7 @@ public class Socket extends Emitter {
|
||||
private boolean disconnected = true;
|
||||
private int ids;
|
||||
private String nsp;
|
||||
/*package*/ Manager io;
|
||||
private Manager io;
|
||||
private Map<Integer, Ack> acks = new HashMap<Integer, Ack>();
|
||||
private Queue<On.Handle> subs;
|
||||
private final Queue<List<Object>> receiveBuffer = new LinkedList<List<Object>>();
|
||||
@@ -407,6 +407,10 @@ public class Socket extends Emitter {
|
||||
return this.close();
|
||||
}
|
||||
|
||||
public Manager io() {
|
||||
return io;
|
||||
}
|
||||
|
||||
private static Object[] toArray(JSONArray array) {
|
||||
int length = array.length();
|
||||
Object[] data = new Object[length];
|
||||
|
||||
@@ -197,7 +197,7 @@ public class ConnectionTest extends Connection {
|
||||
public void reconnectByDefault() throws URISyntaxException, InterruptedException {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
socket = client();
|
||||
socket.io.on(Manager.EVENT_RECONNECT, new Emitter.Listener() {
|
||||
socket.io().on(Manager.EVENT_RECONNECT, new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... objects) {
|
||||
socket.close();
|
||||
@@ -208,7 +208,7 @@ public class ConnectionTest extends Connection {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
socket.io.engine.close();
|
||||
socket.io().engine.close();
|
||||
}
|
||||
}, 500);
|
||||
latch.await();
|
||||
@@ -229,7 +229,7 @@ public class ConnectionTest extends Connection {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
socket.io.engine.close();
|
||||
socket.io().engine.close();
|
||||
}
|
||||
}, 500);
|
||||
latch.await();
|
||||
|
||||
Reference in New Issue
Block a user