add Manager.Options
This commit is contained in:
@@ -79,7 +79,7 @@ public class IO {
|
||||
}
|
||||
|
||||
|
||||
public static class Options extends com.github.nkzawa.engineio.client.Socket.Options {
|
||||
public static class Options extends Manager.Options {
|
||||
|
||||
public boolean forceNew;
|
||||
|
||||
@@ -87,12 +87,5 @@ public class IO {
|
||||
* Whether to enable multiplexing. Default is true.
|
||||
*/
|
||||
public boolean multiplex = true;
|
||||
|
||||
public boolean reconnection = true;
|
||||
public int reconnectionAttempts;
|
||||
public long reconnectionDelay;
|
||||
public long reconnectionDelayMax;
|
||||
public long timeout = -1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Manager extends Emitter {
|
||||
private URI uri;
|
||||
private List<Packet> packetBuffer;
|
||||
private Queue<On.Handle> subs;
|
||||
private IO.Options opts;
|
||||
private Options opts;
|
||||
/*package*/ com.github.nkzawa.engineio.client.Socket engine;
|
||||
private Parser.Encoder encoder;
|
||||
private Parser.Decoder decoder;
|
||||
@@ -103,13 +103,13 @@ public class Manager extends Emitter {
|
||||
this(uri, null);
|
||||
}
|
||||
|
||||
public Manager(IO.Options opts) {
|
||||
public Manager(Options opts) {
|
||||
this(null, opts);
|
||||
}
|
||||
|
||||
public Manager(URI uri, IO.Options opts) {
|
||||
public Manager(URI uri, Options opts) {
|
||||
if (opts == null) {
|
||||
opts = new IO.Options();
|
||||
opts = new Options();
|
||||
}
|
||||
if (opts.path == null) {
|
||||
opts.path = "/socket.io";
|
||||
@@ -487,4 +487,13 @@ public class Manager extends Emitter {
|
||||
super(uri, opts);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Options extends com.github.nkzawa.engineio.client.Socket.Options {
|
||||
|
||||
public boolean reconnection = true;
|
||||
public int reconnectionAttempts;
|
||||
public long reconnectionDelay;
|
||||
public long reconnectionDelayMax;
|
||||
public long timeout = -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user