socket.io-client-java icon indicating copy to clipboard operation
socket.io-client-java copied to clipboard

Why can I only create 64 successful socket connections in version 1.0.2

Open erma66 opened this issue 3 years ago • 0 comments

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);
        } 

erma66 avatar Aug 15 '22 02:08 erma66