I have a question, how do i measure the bandwidth (i`m not sure if this is the right term) as if download rate, upload rate or kbps transfer rate.

Can i do my windows application of my own to calculate this? transfer rate..?

e.g.: i want to measure whats the kbps transfer rate if i download or upload file form a server. How do I program this?