Gottox / socket.io-java-client

Socket.IO Client Implementation in Java
MIT License
950 stars 387 forks source link

Chat program handshake exception #121

Open rlecessi opened 9 years ago

rlecessi commented 9 years ago

I get the following with the examples/chat example client and server.js :

io.socket.SocketIOException: Error while handshaking at io.socket.IOConnection.handshake(IOConnection.java:322) at io.socket.IOConnection.access$600(IOConnection.java:39) at io.socket.IOConnection$ConnectThread.run(IOConnection.java:199) Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:3000/socket.io/1/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1838) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) at io.socket.IOConnection.handshake(IOConnection.java:313) ... 2 more Jun 28, 2015 6:56:01 PM io.socket.IOConnection cleanup INFO: Cleanup

Any help is greatly appreciated.

mklueh commented 8 years ago

Hello, I have the same problem, any news about this?

rlecessi commented 8 years ago

Hello Mklueh,

I never got java io.socket to work, so I redesigned my app in javascript (NODE). Good luck!

mklueh commented 8 years ago

Thank you for your fast response! I´ll try it with JavaScript too

Trellmor commented 8 years ago

This project only supports socket-io 0.9. If you use a newer version of socket-io on your server application, you can try https://github.com/socketio/socket.io-client-java, or downgrade the server version to 0.9.17 or lower.