Does the Android client support SocketIO server

#1

Hello,

My colleague has created a simple SocketIO webserver. I using the
Autobahn WebSocket Android client. But I am not able to connect to the
server. Here's the log:

02-27 16:54:43.527: D/de.tavendo.autobahn.WebSocketConnection(28247):
created
02-27 16:54:43.757: D/dalvikvm(28247): GC_FOR_ALLOC freed 153K, 3%
free 9248K/9479K, paused 29ms
02-27 16:54:43.757: D/de.tavendo.autobahn.WebSocketReader(28247):
created
02-27 16:54:43.765: D/de.tavendo.autobahn.WebSocketConnection(28247):
WS reader created and started
02-27 16:54:43.769: D/de.tavendo.autobahn.WebSocketReader(28247):
running
02-27 16:54:43.769: D/de.tavendo.autobahn.WebSocketWriter(28247):
created
02-27 16:54:43.769: D/de.tavendo.autobahn.WebSocketConnection(28247):
WS writer created and started
02-27 16:54:43.913: D/de.tavendo.autobahn.WebSocketReader(28247):
run() : ConnectionLost
02-27 16:54:43.913: D/de.tavendo.autobahn.WebSocketReader(28247):
ended
02-27 16:54:43.917: D/de.tavendo.autobahn.WebSocketConnection(28247):
fail connection [code = 3, reason = WebSockets connection lost
02-27 16:54:43.921: D/de.tavendo.autobahn.WebSocketReader(28247): quit
02-27 16:54:43.925: D/de.tavendo.autobahn.WebSocketWriter(28247):
ended
02-27 16:54:43.929: E/ArticlesListActivity(28247): Connection Closed
02-27 16:54:43.929: D/de.tavendo.autobahn.WebSocketConnection(28247):
worker threads stopped

Thanks,
Sagar

0 Likes

#2

First, I need to improve the logging of the WS opening handshake response from server;)

Second, probably SocketIO (or the version you are running) doesn't
speak RFC6455 .. I dare to make that guess without knowing/testing since
Autobahn for Android has passed for a long time the WS standard
testsuite (which is also Autobahn .. and used by many WS implementors):

http://www.tavendo.de/autobahn/testsuite/report/mobileclients/index.html

So the question is less "does Autobahn support Socket.IO", but whether
Socket.IO supports RFC6455 .. the answer I dont know.

Third, in principle, Autobahn Android can support not only RFC6455 but also Hybi Draft 10-17 protocol versions .. small change .. I need to
make that configurable. That could be of use in case Socket.IO has no
suuport for RFC6455, but for Hybi-10 e.g. ..

1+3 are TODOs for me .. I can't promise I find time to do that immediately, but I'll try do it this week ..

\Tobias

···

Am 27.02.2012 23:02, schrieb Sagar Hatekar:

Hello,

My colleague has created a simple SocketIO webserver. I using the
Autobahn WebSocket Android client. But I am not able to connect to the
server. Here's the log:

0 Likes

#3

Socket.io in the latest release should support hixie-75, hixie-76, hybi-00,
hybi-07, hybi-08, and hybi-13, I believe Guillermo is working on supporting
rfc6455, however, I'm not sure when that'll be.

(information taken from the websocket.io module that powers socket.io)

As for does Autobahn support Socket.io, probably not. The reason? Socket.io
requires an initial HTTP handshake no matter what the transport protocol is,
this is so that it can work out the protocol to use and communicate various
configuration data.

I'm CC'ing Guillermo in on this so he can track, but this may be best suited to
the Socket.io mailing list. http://groups.google.com/group/socket_io

– Micheil

···

On 27/02/2012, at 10:24 PM, Tobias Oberstein wrote:

Am 27.02.2012 23:02, schrieb Sagar Hatekar:

Hello,

My colleague has created a simple SocketIO webserver. I using the
Autobahn WebSocket Android client. But I am not able to connect to the
server. Here's the log:

First, I need to improve the logging of the WS opening handshake response from server;)

Second, probably SocketIO (or the version you are running) doesn't
speak RFC6455 .. I dare to make that guess without knowing/testing since
Autobahn for Android has passed for a long time the WS standard
testsuite (which is also Autobahn .. and used by many WS implementors):

http://www.tavendo.de/autobahn/testsuite/report/mobileclients/index.html

So the question is less "does Autobahn support Socket.IO", but whether
Socket.IO supports RFC6455 .. the answer I dont know.

Third, in principle, Autobahn Android can support not only RFC6455 but also Hybi Draft 10-17 protocol versions .. small change .. I need to
make that configurable. That could be of use in case Socket.IO has no
suuport for RFC6455, but for Hybi-10 e.g. ..

1+3 are TODOs for me .. I can't promise I find time to do that immediately, but I'll try do it this week ..

\Tobias

0 Likes

#4

Socket.io in the latest release should support hixie-75, hixie-76, hybi-00,
hybi-07, hybi-08, and hybi-13, I believe Guillermo is working on supporting
rfc6455, however, I'm not sure when that'll be.

Ok. I'm committed to make Autobahn Android not only speak RFC6455, but
also Hybie-13/10 (which are really only minor variations of the
final) .. since
those are seen in the wild more broadly (browsers).

Hybi-07/08 has no broader circulation as far as I know. hixie76 ==
hybi-00
does have (on Apple platforms), but is insecure and dying now as
WebKit
Nightly speaks RFC6455 ..

(information taken from the websocket.io module that powers socket.io)

As for does Autobahn support Socket.io, probably not. The reason? Socket.io
requires an initial HTTP handshake no matter what the transport protocol is,
this is so that it can work out the protocol to use and communicate various
configuration data.

It's unlikely that I find enough reason/motivation to implement that
Socket.IO
specific/only initial "pre-handshake" in Autobahn .. being it for
Python or Android.
Autobahn does support standard WebSocket ..

Thanks for the Infos!
\Tobias

···

I'm CC'ing Guillermo in on this so he can track, but this may be best suited to
the Socket.io mailing list.http://groups.google.com/group/socket_io

– Micheil

On 27/02/2012, at 10:24 PM, Tobias Oberstein wrote:

> Am 27.02.2012 23:02, schrieb Sagar Hatekar:
>> Hello,

>> My colleague has created a simple SocketIO webserver. I using the
>> Autobahn WebSocket Android client. But I am not able to connect to the
>> server. Here's the log:

> First, I need to improve the logging of the WS opening handshake response from server;)

> Second, probably SocketIO (or the version you are running) doesn't
> speak RFC6455 .. I dare to make that guess without knowing/testing since
> Autobahn for Android has passed for a long time the WS standard
> testsuite (which is also Autobahn .. and used by many WS implementors):

>http://www.tavendo.de/autobahn/testsuite/report/mobileclients/index.html

> So the question is less "does Autobahn support Socket.IO", but whether
> Socket.IO supports RFC6455 .. the answer I dont know.

> Third, in principle, Autobahn Android can support not only RFC6455 but also Hybi Draft 10-17 protocol versions .. small change .. I need to
> make that configurable. That could be of use in case Socket.IO has no
> suuport for RFC6455, but for Hybi-10 e.g. ..

> 1+3 are TODOs for me .. I can't promise I find time to do that immediately, but I'll try do it this week ..

> \Tobias

0 Likes