开发者

WebSocket library for Android, iOS and Flash [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

开发者_开发知识库 Improve this question

can someone please provide an example of WebSocket implementation in Android, iOS(iPhone/iPad) and Flash (not flex!).

I found some libraries but none of that work :). My browser WebSocket implementation is working great using Socket.IO, now I would like to dig also into Android, iPhone and Flash.

I tried to implement a Android webview pointing to a website where sockets are implemented, but it doesn't work. I would be great to have some native library for that.

Thx for your help!


This is an old thread, but I should point out for iOS, Unitt and other existing iOS WebSocket clients don't support the latest standard.

We just released a WebSocket client called SocketRocket. (disclaimer: I'm the author)

It supports the latest standard, RFC 6455, has no external dependencies, and works with iOS 4.x. It also should be really fast and compliant. Passes all of the Autobahn tests too


iOS 4.2 and above have native WebSockets support.

For Android devices with Flash support (or any browser with Flash) you can use web-socket-js. Socket.IO actually includes web-socket-js as one of the transports that can be enabled.

See caniuse.com for an up-to-date list of browsers and mobile devices with native WebSockets support.

Update:

For native iOS applications (Objective-C) check out UnittWebSocketClient. One caveat: I looked in the code and it uses the HyBi-07 version of the protocol which is more recent than the Hixie-76 version currently supported by most browsers. However, if the server you are connecting to supports HyBi-07 or later it shouldn't be a problem.


jWebSocket seem to have Android support.


I realize that it's bad form to respond to such an old thread, but this post keeps showing up in my searches. After research (but without implementing yet), Autobahn seems like the best option for the Android platform by far. Many of the other options use their test suite, a newer draft is supported (protocol 13, draft 14), and I found the project tutorials very helpful.


For Android native apps, there is Autobahn WebSockets for Android

https://github.com/oberstet/AutobahnAndroid

It supports the final RFC6455, integrates well with UI and service apps, provides RPC and PubSub over WebSockets, and more. Check out the project README on GitHub.

Disclaimer: I am the author of Autobahn.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜