Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebSockets for Android AND iOS Apps

Is there a project that provides libraries for communication over WebSocket for both Android and iOS? I know jWebSocket, but it is pretty much dead, and does not provide a lib for iOS. I know Autobahn, but it too supports only Android. I also know SocketRocket, but that is only for iOS. Is there something that supports both, or two solutions that are 100% compatible with WebSocket?

Thanks!

like image 258
i-- Avatar asked Dec 21 '22 16:12

i--


1 Answers

iOS uses ObjectiveC and Android Java, so there can't be a library that provides building the same unmodified user source code for both platforms for the platform's native language. You could have that (in principle) using C. And of course JavaScript.

Apart from that regarding the wire protocol AutobahnAndroid and SocketRocket should be absolutely compatible, since both use the AutobahnTestsuite to test protocol compliance.

Above is for pure WebSocket. If you want to use higher level features of i.e. Autobahn like the Publish & Subscribe and RPC messaging patterns provided by WAMP, we plan to have a iOS version of Autobahn that adds those .. on top of SocketRocket. No need to reinvent a mature, robust WebSocket implementation on iOS.

Disclaimer: I am creator of Autobahn/WAMP.

like image 68
oberstet Avatar answered Dec 31 '22 14:12

oberstet