Re: Reading NSInputStream
Re: Reading NSInputStream
- Subject: Re: Reading NSInputStream
- From: Jens Alfke <email@hidden>
- Date: Wed, 21 Oct 2009 13:28:15 -0700
On Oct 21, 2009, at 1:04 PM, Ashley Perrien wrote:
After initiating a connection (getStreamsToHost) I don't get an
event that the input stream has bytes available, if I check it, it
returns NO but if I go ahead and read it anyway, I get the usual
banner.
It sounds like you didn't call -scheduleInRunLoop:forMode: ?
uint8_t *readBuffer;
unsigned int bufferLength;
BOOL gotBuffer = [readStream getBuffer: &readBuffer length:
&bufferLength];
The last line always says arguments 1 and/or 2 are incompatible
pointer type. I've tried every combination of * and &, no luck.
Try declaring bufferLength as NSUInteger, as it's declared in the docs
and header.
If that doesn't work you'll have to actually show us the exact error
message you got.
—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