Re: Writing 0 bytes to a CFWriteStream
Re: Writing 0 bytes to a CFWriteStream
- Subject: Re: Writing 0 bytes to a CFWriteStream
- From: Frederick Cheung <email@hidden>
- Date: Wed, 17 Nov 2004 22:35:07 +0000
On 17 Nov 2004, at 18:54, Jeremy Wyld wrote:
Knowing the code, the results that you get don't really surprise me.
Sorry about the head thing. If you file a bug, I could probably make
it support this, at least at the CFSocketStream layer. BTW, if you
tell read to read zero bytes, I'll put money on the fact that it will
mark the stream as being at the end too. I'm just warning you now. :)
I should invest in one of those gel wrist-rests, might catch my head
every now and again :). radar://3883957 for anyone who cares.
Fred
On Nov 17, 2004, at 10:44 AM, Frederick Cheung wrote:
It has been suggested that I ask this here, rather than on
carbon-dev, anyway here I go:
I've just noticed that attempting to write 0 bytes to a CFWriteStream
(in my case a file stream, i haven't tried other kinds) marks the
stream as being at the end (thus causing later writes to fail). This
may seem like a rather odd thing to do, In my case i had just
received the body of a http request (via CFHTTPMessageCopyBody) and
was just blindly writing out the contents of the CFData that
returned, which in some circumstances could be no data at all.
Anyway, this doesn't seem to be documented, is it normal? Either way
it's not hugely important, but if it had been documented it would
have saved me non trivial amounts of banging head against desk.
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden