Displaying 1 result from an estimated 1 matches for "kbps_byte".
Did you mean:
kbps_bytes
2004 Aug 06
3
net/sock.c question
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I have started to add bandwidth <limit> option to icecast. My ideea is to
compute the current bandwidth by estimation on each sock_write*() call.
Something like this:
1. initially we set kbps = 0, kbps_time = now and kbps_bytes = 0
2. after some time, a sock_write*() function is called which in turn calls
sock_kbps_update(nobytes); sock_kbps_update fetches current timestamp,
adds nobytes to kbps_bytes then:
2.1 if the time difference between now and kbps_time is smaller than
ESTIMATION_INTERVAL (which I think a value...