Calculating time required to recieve packets...

From: Adam Balgach (ffld_at_hotmail.com)
Date: 09/28/04


Date: 28 Sep 2004 08:48:12 -0700

Greets all,

i am in the process of writing a simple client/server file upload
program that sends data via UDP packets. I have the process of
opening.sending, recieving & writing all working (via a stop/wait arq)
now what i would ideally like to do is time how long hte transfer took
place, ie from the moment that the first packet was recieved until the
last, so that i can calculted the transfer rate. (also i would liek
to implement a timeout/resend if packets get lost) but i dont even
know wehre to begin. ive been looking at struct timeval but can find
any resonable examples for this. anyone have any idea?

thanks.

Cheers,
Adam.



Relevant Pages