Re: Create a socket.io connection to node.js server
Re: Create a socket.io connection to node.js server
- Subject: Re: Create a socket.io connection to node.js server
- From: Jens Alfke <email@hidden>
- Date: Fri, 07 Dec 2012 13:19:06 -0800
On Dec 7, 2012, at 11:04 AM, Vavelin Kévin <email@hidden> wrote:
> Yes I understand, I use NSInputStream and NSOutputStream for writing something but I don't know why I have my stream closed after an event hasSpaceAvailable or something like that.
But previously you said you get messages 2 and 4, which are NSStreamEventHasBytesAvailable and NSStreamEventHasSpaceAvailable (I was wrong in my earlier reply; was looking at the wrong set of constants.) The close/error events are 8 and 16.
In any case, if your socket gets closed abruptly it’s often because the remote server didn’t like the message you sent and hung up on you, which is a protocol-specific issue. I don’t know anything about the socket.io protocol; you might have to ask on a node.js list for help with that.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden