I’m trying to setup a very simple ServerSocket in an Android app that responds to 1 browser’s WebSockets request. The socket connection seems to fail on the client end (inside Google Chrome), I believe because of issues handling the WebSockets handshaking. What is the simplest approach to getting the connection setup? I’m not interested in this being production-ready since I’ll only ever establish one connection.
Share
WebSocket is not raw TCP .. for 2 reasons: initial HTTP-based handshake + message framing after that.
So if you want to accept WS connections in a server running on Android, you need a WS server framework.
I’d suggest you have a look at Jetty:
http://code.google.com/p/i-jetty/
http://jetty.codehaus.org/jetty/
Jetty is pretty mature, solid and compliant.