----- Original Message ----- 
From: "G. M. Faggiano" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Thursday, September 01, 2005 2:58 AM
Subject: [twsocket] Download time


> Hello,
>
> I'm trying to write a little app that downloads a file from my server at
> regular intervals and tells me what my true connection speed is.
> I'm doing this because I use a broadband connection through my lan.  So,
> I have no real way to check my current speed without going to one of
> those online speed tests.  I just want to represent my speed in mps via
> an icon in my system tray.  If anyone has a better Idea on how to get
> the result I'm after, please tell me.  Here is what I'm doing now.
>
> I'm using a ThttpCli to download a 500kb file from my server.  I could
> go bigger, but I have a 6000mb transfer limit per month on my server.  I
> would rather do this another way, but this is the only way I know of.
> Still, doing it this way, I can't figure out how to determine the time
> it took to download the file.  I hope this makes sense to someone.
>
> Also, Francois, your components are awesome!  I've been using them for
> about two years now.  I'll be sure to send you a post card.

Use GetTickCount when you start the transfer and store the value somewhere. 
When the request is complete, if the download was successful, use 
GetTickCount again, subtract the original value and you have the tick taken 
in milliseconds.  Are you using cable or some form of DSL? Maybe the modem 
has a way to get the connection speed, via snmp or by looking at its 
configuration pages.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to