Re: Writing 0 bytes to a CFWriteStream
Re: Writing 0 bytes to a CFWriteStream
- Subject: Re: Writing 0 bytes to a CFWriteStream
- From: Jeremy Wyld <email@hidden>
- Date: Wed, 17 Nov 2004 10:54:28 -0800
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. :)
jeremy
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:
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