Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot interop with server implemented in 'io.socket:socket.io-server:4.0.1' #737

Open
chenzx opened this issue Apr 14, 2023 · 1 comment
Labels

Comments

@chenzx
Copy link

chenzx commented Apr 14, 2023

Describe the bug
I expect latest socket.io-client-java 2.1.0 can interop with 'io.socket:socket.io-server:4.0.1', but can't

Android 10 emulator, client use config:

IO.Options opt = IO.Options.builder()
                    // IO factory options
                    .setForceNew(true)
                    .setMultiplex(true)
                    // low-level engine options
                    .setTransports(new String[] { Polling.NAME, WebSocket.NAME })
//                    .setTransports(new String[] { WebSocket.NAME })
                    .setUpgrade(true)
                    .setRememberUpgrade(false)
                    .setPath("/owt/")
                    .setQuery(null)
                    .setExtraHeaders(null)
                    // Manager options
                    .setReconnection(true)
                    .setReconnectionAttempts(Integer.MAX_VALUE)
                    .setReconnectionDelay(1_000)
                    .setReconnectionDelayMax(5_000)
                    .setRandomizationFactor(0.5)
                    .setTimeout(6_000)
                    // Socket options
                    .setExtraHeaders(singletonMap("accept-encoding", singletonList("identity")))
                    .setAuth(null)
                    .build();
            if (socketIOClient != null) {
                Log.d(TAG, "stop reconnecting the former url");
                socketIOClient.disconnect();
            }
            socketIOClient = IO.socket(url, opt);

server code is based on https://github.com/trinopoty/socket.io-server-java/blob/master/socket.io-server-test/

@chenzx chenzx added the bug label Apr 14, 2023
@juanobligado
Copy link

Having the same issue, seems that the client is tied to server 3.x version. Would like to work on a patch for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants