summaryrefslogtreecommitdiffstats
path: root/3rdparty/openpgm-svn-r1085/pgm/token and leaky bucket.txt
blob: 3efb9c7ab754e0abcbd344794bab0b7f0a88b295 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
leaky bucket:

	if (BUCKET->rate_limit > BUCKET->rate_per_sec) 
		BUCKET->rate_limit = BUCKET->rate_per_sec;


token bucket:

	guint bucket_limit;

	if (BUCKET->rate_limit > BUCKET->bucket_limit)
		BUCKET->rate_limit = BUCKET->bucket_limit;