S
S
Sergey Karbivnichy2016-03-22 13:28:20
Programming
Sergey Karbivnichy, 2016-03-22 13:28:20

How to calculate the traffic used in my program?

There is a simple program for listening to Internet radio stations in c#. To listen to the audio stream, the program uses the un4seen bass.dll library. How can the program find out how much data has been downloaded from the Internet during the program's operation. I have no idea where to dig. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Filatov, 2016-03-22
@NYMEZIDE

You should probably look at the BASS_STREAM properties and
look for LENGTH - this is the number of bytes loaded in the stream.
Stream.Length needs to be checked in a separate thread, parallel to playback. Every 5-10 seconds, check how many bytes are in the stream and append (update) to the program storage. Total.
Something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question