News for hackers. Stuff that matters.
Re:Native Socket.IO and Android by priz3 on Tuesday January 20, 2015 @12:31PM (#8918066)
I've been using Socket.IO on Android for 6+ months now to do real-time communication with our backend, and it works well for our needs. I was happy to see a well-written Android client come along with Socket.IO v1.0. The namespacing functionality makes it super easy to send different messages to different groups of clients.
Re:Native Socket.IO and Android by dkharrat on Tuesday January 20, 2015 @06:09PM (#8920318)
This is pretty cool.

On a similar note, anyone know of equivalent options for iOS? I see a few open source implementations, but none that are actively developed. There's SocketRocket, but that's just vanilla WebSockets.

Re:Native Socket.IO and Android by priz3 on Tuesday January 20, 2015 @07:04PM (#8920598)
There is a similar Socket.IO library for iOS hidden within the FAQ.

http://socket.io/docs/faq/

Re:Native Socket.IO and Android by SchizoDuckie on Tuesday January 20, 2015 @11:26AM (#8917647)
Wow.

I've just had a heated debate about this at work. I think it's pretty cool, my colleague thinks it's the worst idea ever.

Does this actually work in the real world? What if i'm moving?

Re:Native Socket.IO and Android by EC1 on Tuesday January 20, 2015 @01:18PM (#8918437)
What are the opposing viewpoints?
Re:Native Socket.IO and Android by Thaxll on Tuesday January 20, 2015 @10:57AM (#8917505)
Since almost all platforms support Websocket, is it necessary to use Socket.io?
Re:Native Socket.IO and Android by elisee on Tuesday January 20, 2015 @11:05AM (#8917549)
On top of its transport layer abstraction, socket.io adds various useful features including events, rooms, namespacing, efficient/convenient (de)serialization and network callbacks. I've been using it in websockets-only mode for various projects, because I don't care for slower / less reliable transports but still want the extra features.
Re:Native Socket.IO and Android by jeffasinger on Tuesday January 20, 2015 @12:51PM (#8918219)
While Websocket has good supports by browsers, it doesn't always handle switching between networks correctly, also, some networks disallow Websockets altogether, or drop websocket connections over HTTP, but not over HTTPS.

Socket.io (especially > 1.0) solves these issues with a layer by having smart reconnection mechanisms and starts by connecting over plain old HTTP longpolling, and upgrades the connection to use websockets if they're available and work.

Re:Native Socket.IO and Android by dj2stein9 on Tuesday January 20, 2015 @07:44PM (#8920764)
It's not. There's an under-appreciated NPM module which is/was shared by Socket.IO that only handles the low-level WebSocket protocol for NodeJS:

https://www.npmjs.com/package/websocket.io

You can use that, and the built-in WebSocket object in modern browsers.

Re:Native Socket.IO and Android by Lord_Zero on Tuesday January 20, 2015 @12:12PM (#8917953)
So its basically SingalR for Android? Seems like a cool idea to me.
Re:Native Socket.IO and Android by wuliwong on Tuesday January 20, 2015 @12:55PM (#8918251)
I don't believe so. I believe SignalR is more synonymous with node's implementation of socket.io. This would be like someone getting SignalR to work natively with an Android client.
Re:Native Socket.IO and Android by solids on Tuesday January 20, 2015 @12:57PM (#8918266)
Grande Guille!