add tests

This commit is contained in:
Naoyuki Kanezawa
2014-04-10 02:35:14 +09:00
parent 527a3c640c
commit 9338615745
6 changed files with 235 additions and 86 deletions

View File

@@ -79,7 +79,7 @@ public class Manager extends Emitter {
private List<Packet> packetBuffer;
private Queue<On.Handle> subs;
private IO.Options opts;
private com.github.nkzawa.engineio.client.Socket engine;
/*package*/ com.github.nkzawa.engineio.client.Socket engine;
private Parser.Encoder encoder;
private Parser.Decoder decoder;
@@ -92,6 +92,14 @@ public class Manager extends Emitter {
private ScheduledExecutorService reconnectScheduler = Executors.newSingleThreadScheduledExecutor();
public Manager() {
this(null, null);
}
public Manager(URI uri) {
this(uri, null);
}
public Manager(IO.Options opts) {
this(null, opts);
}

View File

@@ -50,7 +50,7 @@ public class Socket extends Emitter {
private boolean disconnected = true;
private int ids;
private String nsp;
private Manager io;
/*package*/ Manager io;
private Map<Integer, Ack> acks = new HashMap<Integer, Ack>();
private Queue<On.Handle> subs;
private final Queue<List<Object>> buffer = new LinkedList<List<Object>>();