[sane-devel] Network protocol packet sizes

Oliver Rauch oliver.rauch@rauch-domain.de
Fri, 15 Mar 2002 21:30:11 +0100


Dave Close wrote:
> 
> Oliver Rauch wrote:
> >(I quote the full mail because it did not get into the SANE-DEVEL mailing
> >list, please press "Reply all" to CC your mails also to the mailing list).
> 
> Oliver, I initially posted my question to the list and you replied
> privately.

That is not correct, I always replied this thred as "reply all"
(I just checked it again). But we do not need to discuss this.

> I responded to you privately. If you had wanted the whole
> discussion on the list, you should have started it that way. It does
> not seem right to quote just our last exchange to the list, leaving
> some of the context out, while chiding me for keeping it private.

All my answers were posted to the list.

 > 
> You are generalizing incorrectly. The only valid statement here is
> that sane_read() will not return more data than the maximum buffer
> size specified on the call. I have a backend which will return up to
> 32K bytes on a single call if run locally.

In this case the backend you use is an exception. Most other backends
use a reader process and use a pipe between reader process and pipe.

> 
> I have never suggested any kind of wait. I pointed out that the network
> protocol requires that the true backend already have all the data for
> a single block available before it can put a size at the beginning of
> the transmission. The transmission then gets broken up by the network
> and the net backend treats each piece as a separate block. There is no
> delay involved if net were to collect all the pieces of a block together
> before responding to a sane_read() call.

Ok, then I misunderstood your suggestion. But it still is no help for
the frontend. Most local backends behave comparable to the now existing
net backend and you will not speed up anything with this.

If you want to spend some time for SANE there are several things that should
be done and are much more important and interesting (e.g. a meta backend
that adds contrast/brightness/gamma emulation based on digital gamma table
to all backends).

Bye
Oliver

-- 
Homepage:	http://www.rauch-domain.de
sane-umax:	http://www.rauch-domain.de/sane-umax
xsane:		http://www.xsane.org
E-Mail:		mailto:Oliver.Rauch@rauch-domain.de