WSS support in android

#1

I see in the AutobahnAndroid source file WebSocketConnection.java that
you don't seem to support WSS yet. Is this a feature planned for the
future? Do you know if anyone is doing this? I've been trying to
connect to a jetty server from an android app and just can't seem to
get it working. I can connect through a browser and through a
standalone java main program, but it fails when trying through android
app.

Thanks much.

0 Likes

#2

WSS support will be added in the future .. I've created an issue to track it:

https://github.com/oberstet/AutobahnAndroid/issues/8

0 Likes

#3

Hi Tobias, thanks for the reply.

Do you know if Android currently supports WSS? I did a bit of playing
around trying to get an app to connect to a jetty websocket server and
had no luck. There is so little information out there about WSS at
this point that I couldn't really find anyone saying a whole lot about
it.

Thanks again for your time.

···

On Feb 17, 5:34 pm, Tobias Oberstein <tobias.o...@gmail.com> wrote:

WSS support will be added in the future .. I've created an issue to
track it:

https://github.com/oberstet/AutobahnAndroid/issues/8

0 Likes

#4

Hi Tobias, thanks for the reply.

Do you know if Android currently supports WSS? I did a bit of playing
around trying to get an app to connect to a jetty websocket server and
had no luck. There is so little information out there about WSS at
this point that I couldn't really find anyone saying a whole lot about
it.

WebSockets support (whether WS or WSS) is not built into the Android
platform per-se.

Android has of course TCP .. and stuff like HTTP built into .. but not
WebSockets.

Instead, you need a WebSocket library/framework .. like Autobahn.

WSS is just WebSockets over a TCP connection which has been upgraded
to SSL before the WebSocket protocol kicks in.

The "problem" with adding WSS support to Autobahn is as follows.

First, if you use classic, blocking netwoork code (which also does
involve copying things around) like i.e. Weberknecht, adding SSL
is totally easy:

http://code.google.com/p/weberknecht/source/browse/trunk/src/main/de/roderick/weberknecht/WebSocketConnection.java#247

Now, Autobahn uses Java NIO .. for performance reasons, since it
doesn't copy things around.

Unforntunately, there doesn't seem to be an easy analog to

SocketChannel

like i.e. SSLSocketChannel.

When you Google for "Java NIO SSL" .. it seems to be non-trivial, sadly.

What's needed with Autobahn and WSS is extending the code here:

https://github.com/oberstet/AutobahnAndroid/blob/master/Autobahn/src/de/tavendo/autobahn/WebSocketConnection.java#L76

If you can help with "Java NIO SSL" stuff (how do I do that .. easily)
.. that would speed up bringing WSS to Autobahn;)

\Tobias

···

Am 23.02.2012 22:54, schrieb mweeks:

Thanks again for your time.

On Feb 17, 5:34 pm, Tobias Oberstein<tobias.o...@gmail.com> > wrote:

WSS support will be added in the future .. I've created an issue to
track it:

https://github.com/oberstet/AutobahnAndroid/issues/8

0 Likes