Re: NSStream's enum of NSStreamEventEndEncountered.
Re: NSStream's enum of NSStreamEventEndEncountered.
- Subject: Re: NSStream's enum of NSStreamEventEndEncountered.
- From: Alex Zavatone <email@hidden>
- Date: Thu, 24 Jul 2014 15:30:16 -0400
On Jul 24, 2014, at 2:46 PM, Ken Thomases wrote:
> On Jul 24, 2014, at 1:05 PM, Alex Zavatone <email@hidden> wrote:
>
>> - (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent) streamEvent,
>>
>> I'll log streamEvent and in the case of 4, which is is supposed to be typdefed to NSStreamEventEndEncountered, it's never trapped at all.
>
> NSStreamEventEndEncountered is not supposed to be equal to 4. It's equal to 1UL << 4 (as you noted) which is 16. If you're getting 4, that's NSStreamEventHasSpaceAvailable.
Ahhhhhhh! DOH!
Great. I'm checking for NSStreamHasBytesAvailable, but not NSStreamHasSpaceAvailable.
Wonderful. This explains all. Looking at all the typedefs, it looks like my brainspace got namespace confusion.
Awesome, man.
Thanks all.
Alex Zavatone
_______________________________________________
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