* Make the import operation through the daemon much more efficient
(way fewer roundtrips) by allowing the client to send data in bigger chunks. * Some refactoring.
This commit is contained in:
parent
78598d06f0
commit
e0bd307802
6 changed files with 68 additions and 44 deletions
|
|
@ -1199,10 +1199,11 @@ struct HashAndReadSource : Source
|
|||
{
|
||||
hashing = true;
|
||||
}
|
||||
virtual void operator () (unsigned char * data, size_t len)
|
||||
size_t read(unsigned char * data, size_t len)
|
||||
{
|
||||
readSource(data, len);
|
||||
if (hashing) hashSink(data, len);
|
||||
size_t n = readSource.read(data, len);
|
||||
if (hashing) hashSink(data, n);
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue