powered by Jive Software

FileTransfer Progress

HI! How can I get, at the time of a FileTransfer, the number of bytes transfer at this specific moment; the rate/speed of transfer; the complete time of transfer???

Anyone can help me???

THANKS

Andrés

Message was edited by: hadesandres

Hi Andrés,

patch the source as decribed here[/url] or use the nightly build.

The transfer rate and the duration you may calculate using the returned value.

LG

You’'ll want to sample the amount of bytes recieved at two different points subtract the larger value from the smaller value divide by the amount of time that has passed and you will have the rate of transfer.

OutgoingFileTransfer outgoing;

double initial = outgoing.getBytesSent();

wait(2000);

double after = outgoing.getBytesSent();

double rate = (after - initial) / 2;

/code

rate in this code snippet is bytes per second.

well, it looks like work fine…

THANKS…

Hi Andrés,

your question seems to be solved, marking it as such and giving Alex 10 points will make him happy for the work he had. So he may help once again if you need further assistance with other issues.

LG

ok