[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Streams: EOF detection

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-11-26 20:48:45 CET

On 11/26/05, Erik Huelsmann <ehuels@gmail.com> wrote:
> I'm trying to write a stream implementation and I need to know the
> criterion for detecting the stream I'm relaying.
>
> Now, the headers for streams say that a partially satisfied read
> (without error) means an EOF condition was found. Reading the
> implementation for svn_stream_copy, it keeps reading the stream until
> a non-satisfied read is encountered (returned bytes == 0).

Hmm. Reading the implementation again, I see I'm wrong here.
svn_stream_copy does it exactly as documented in the headers.

> I think the latter condition is saner, since I think to be told that
> there are socket reads which are successful, but only return part of
> the requested data without meaning to signal EOF.
>
> What'll be the official 'verdict'?

Well, I guess the question about the strategy remains. Which one is saner?

bye,

Erik.
Received on Sat Nov 26 20:49:29 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.