Content-type: text/html
void lcg_set_transfer_callback (copyfile_callback_t *cb);
copyfile_callback_t lcg_get_transfer_callback ();
typedef struct {
GFAL_LONG64 transferred_bytes;
float instant_throughput;
float avg_throughput;
} perf_t;
typedef void (* copyfile_callback_t) (
perf_t s_perf,
struct timespec ts,
int *timeoutflg
);
void copy_print_callback(perf_t perf, struct timespec ts, int *timeoutflg) {
fprintf(stderr,"\r %12lld bytes", (GFAL_LONG64)perf.transferred_bytes);
fprintf(stderr," %9.2lf KB/sec avg", (double)perf.avg_throughput/1024);
fprintf(stderr," %9.2lf KB/sec inst", (double)perf.instant_throughput/1024);
}