summaryrefslogtreecommitdiff
path: root/lib/CopyJob.cc
blob: 7dccbc58d14e35652b65b1a8dadfdef6ea661f25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "CopyJob.h"

CopyJob::CopyJob(Handle & as, Handle & ad) : s(as), d(ad) { }

CopyJob::~CopyJob() { }

int CopyJob::Do() {
    int r;
    char buffer[4096];
    
    while (!s.IsClosed()) {
	r = s.read(buffer, 4096);
	d.write(buffer, r);
    }
}