[EMAIL PROTECTED] wrote:
>
> > In fact, in mod_tls, I should not assume that the underlying filter is a
> > socket, so I shouldn't be testing for EOF anyway - I should simply
> > return EOS when the brigade is empty.
>
> You should never return EOS. EOS is a bucket type, and it must come from
> the lowest level possible. If you are reading from the socket, then you
> should add an EOS bucket to the brigade once you have read all the data.
This is not compatible with previous theories! If a socket bucket is in
the middle of a stream of other buckets, then returning an EOS would be
wrong, wouldn't it?
> If you are reading from a brigade, then you should only ever see an EOS
> bucket if the lower level filter gave you one.
This makes it impossible to mix a socket or pipe bucket in a brigade
with other types, doesn't it?
> > So, my next question is: what is the purpose of an EOS bucket? Surely
> > its the same as an empty brigade?
>
> No. An empty brigade means that there is no more data, right now. An EOS
> means there never will be any more data.
I now understand that.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff