socket.io-client-java
socket.io-client-java copied to clipboard
Why can I only create 64 successful socket connections in version 1.0.2
When I tried to test how many socket connections I could create, I found that only 64 were connected and the rest were disconnected
IO.Options options = new IO.Options();
// IO factory options
options.forceNew = false;
options.multiplex = true;
options.transports = new String[]{WebSocket.NAME};
options.upgrade = true;
options.rememberUpgrade = false;
options.path = this.path;
options.query = this.query;
options.reconnection = true;
options.reconnectionAttempts = Integer.MAX_VALUE;
options.reconnectionDelay = 1000;
options.reconnectionDelayMax = 5000;
options.randomizationFactor = 0.5;
options.timeout = 10000;
try {
socket = IO.socket(address, options);
socket.on(listen, objects -> {
log.debug("receiver message,{}", objects);
onReceiver.accept(objects);
});
log.info("init socket success,query:{}", options.query);
socket.connect();
} catch (URISyntaxException e) {
log.error("init socket success", e);
}