3

I am looking to leverage my existing (and quite simple) NodeJS+SocketIO server application with a new Android based client. This is not using the WebKit browser, but a native WebSocket client within the Android SDK.

I have found the library "Weberknecht" and loaded it into my Android project, and when I attempt a connection to the WebSocket URL I see a "WARN - client not handshaken client should reconnect" message in my NodeJS trace.

Presumably the SocketIO framework does some extra work pre-WebSocket and that is why I am having issues. Has anyone else done this kind of "cross-library" work against SocketIO, and if so could you offer any assistance please.

2 Answers 2

1

There is already a Java client for Socket.IO, you can look at the different port at the wiki page. Also, there is a description of the socket.IO protocol on the wiki page.

It seems like the first thing that Java port does when it connects is that it sends a "1::(path)" connect message. Are you sending the connect message?

Sign up to request clarification or add additional context in comments.

6 Comments

Agreed. I found this a day or so ago. I did have to do some recompiling work but I now have a simple JAR library which works in Android. I will be publishing this, with consent from the authors, ASAP.
@richbayliss Have you published the library somewhere?
@SagarHatekar unfortunately not yet. I have been tied up with other things. I will try and find some time to do this and I will update this thread with details.
@richbayliss Okay, waiting to check it out. What license do you plan to publish it with?
Hey Rich, I'd be interested in your lib that works on android, is it up yet?
|
1

If you are still looking for an answer, then checkout out https://github.com/koush/android-websockets, which got released recently. It has full support for socket.io server running in node.js

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.