Upgrading the version from 0.8.3 to 2.0.1 not work
jiawade opened this issue · 4 comments
my current socket version is: 0.8.3
my code is:
public static void main(String[] args) throws URISyntaxException {
IO.Options options = new IO.Options();
options.path = "/socket/";
Socket socket = IO.socket("http://10.12.13.4/socket",options);
socket.open();
socket.on(Socket.EVENT_CONNECT, args1 -> {
System.out.println("success");
}).on(Socket.EVENT_CONNECT_ERROR, args2 -> {
System.out.println("error");
});
socket.connect();
}
print success. so this works fine
but, I upgrade to 2.0.1, this not work, print error, Is there anything else I need to do?
Hi! What is the version of the server?
You can check the compatibility table here: https://socketio.github.io/socket.io-client-java/installation.html
Hi, I looked at our backend socket service and it was: netty-socketio, the details are as follows:
com.corundumstudio.socketio
netty-socketio
1.7.18
It seems the netty server implements the previous version of the protocol (Socket.IO 2.x), which is not compatible with the 2.0.1 client: https://github.com/mrniko/netty-socketio#features
Got it! Thank you very much. @darrachequesne