开发者

socket connection bandwith limiting / traffic shaping with ActionScript

开发者 https://www.devze.com 2023-01-07 14:37 出处:网络
Does anyone know of a way t开发者_如何学运维o monitor and/or limit bandwidth usage for a given socket connection in ActionScript 3?

Does anyone know of a way t开发者_如何学运维o monitor and/or limit bandwidth usage for a given socket connection in ActionScript 3?

I have an Adobe AIR app from which I need to upload large streams of data. However, due to bandwidth restrictions I want my users to be able to designate how much upstream bandwidth the application can use.

Any ideas?


I don't think it's possible to control the bandwidth usage(might be wrong though) The best thing to do is to split your data into chunks and wait an interval of time between sending each one. The amount of time to wait can be in a directly proportional relation with a "How much bandwidth to use?" slider.

Also take a look as Token buckets: http://en.wikipedia.org/wiki/Token_bucket

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号