iphone socket.io

307 views
Skip to first unread message

Tyler Gillies

unread,
May 30, 2010, 12:50:54 AM5/30/10
to nodejs
anyone know if socket.io works on iphone? Its working on my desktop
browsers but doesn't seem to work on iphone...

Micheil Smith

unread,
May 30, 2010, 2:20:05 AM5/30/10
to nod...@googlegroups.com
Sockets.io would be best working with a native websockets implementation, which is
currently missing. There is a bounty of ~$150 on the PhoneGap mailing list for
the person to implement a raw socket api for phonegap.

Yours,
Micheil Smith
--
BrandedCode.com

On 30/05/2010, at 2:50 PM, Tyler Gillies wrote:

> anyone know if socket.io works on iphone? Its working on my desktop
> browsers but doesn't seem to work on iphone...
>

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>

Guillermo Rauch

unread,
May 30, 2010, 2:35:28 AM5/30/10
to nod...@googlegroups.com
Works for me on my iPhone 3GS with the long-polling transport

30 May 03:27:11 - socket.io ready - accepting connections
30 May 03:28:05 - Initializing client with transport "xhr-polling" < iphone
30 May 03:28:05 - Client 34623237140476704 connected
30 May 03:28:27 - Initializing client with transport "websocket" < safari 4
30 May 03:28:27 - Client 9715979627799243 connected

content

The only gotcha, as seen in the picture, is the progress bar constantly showing, which can be hidden with some <meta> tags I think.

What Socket.IO version are you using?

--
Guillermo Rauch
http://devthought.com

Guillermo Rauch

unread,
May 30, 2010, 2:37:12 AM5/30/10
to nod...@googlegroups.com
Also, iPhone OS 4 Safari is reported to include WebSocket.

Guillermo Rauch

unread,
May 30, 2010, 2:38:11 AM5/30/10
to nod...@googlegroups.com
On Sun, May 30, 2010 at 3:20 AM, Micheil Smith <mic...@brandedcode.com> wrote:
Sockets.io would be best working with a native websockets implementation 

Not sure I understand: WebSocket is the preferred transport for Socket.IO.

tyler gillies

unread,
May 30, 2010, 2:42:50 AM5/30/10
to nod...@googlegroups.com
Hey screenshot helped me because i saw you went to port 8080 on client side.

i was originally going through nginx to get to chat.html

--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

tyler gillies

unread,
May 30, 2010, 2:44:46 AM5/30/10
to nod...@googlegroups.com
weird that it would work for desktop and not phone though

Micheil Smith

unread,
May 30, 2010, 2:47:38 AM5/30/10
to nod...@googlegroups.com
>> On Sun, May 30, 2010 at 3:20 AM, Micheil Smith <mic...@brandedcode.com> wrote:
>> Sockets.io would be best working with a native websockets implementation
>
> On 30/05/2010, at 4:38 PM, Guillermo Rauch wrote:
> Not sure I understand: WebSocket is the preferred transport for Socket.IO.
>

Yeah, although, rather then just using it in a web browser, you could use it through a
native application, but build with web technologies in phonegap.

I have to say, that reply did come across rather convoluted, my bad.

CC

unread,
Jun 1, 2010, 6:03:36 AM6/1/10
to nod...@googlegroups.com
Ok, no WebSocket on the iPhone...

I use socket.io on a subdomain, so no long-polling => no socket.io.
That's a problem. I have to add a module for long-polling with
cross-SUBdomain or their is an other solution ?

2010/5/30 tyler gillies <tjgi...@gmail.com>


>
> Hey screenshot helped me because i saw you went to port 8080 on client side.
> i was originally going through nginx to get to chat.html
>
> On Sat, May 29, 2010 at 11:35 PM, Guillermo Rauch <rau...@gmail.com> wrote:
>>
>> Works for me on my iPhone 3GS with the long-polling transport
>> 30 May 03:27:11 - socket.io ready - accepting connections
>> 30 May 03:28:05 - Initializing client with transport "xhr-polling" < iphone
>> 30 May 03:28:05 - Client 34623237140476704 connected
>> 30 May 03:28:27 - Initializing client with transport "websocket" < safari 4
>> 30 May 03:28:27 - Client 9715979627799243 connected
>>
>>

Guillermo Rauch

unread,
Jun 1, 2010, 6:10:06 AM6/1/10
to nod...@googlegroups.com
CC,

I'm working on adding cross-domain support. Some forks already have it: http://github.com/mscdex/Socket.IO-node/
Guillermo Rauch
http://devthought.com
Reply all
Reply to author
Forward
0 new messages