[p2p-hackers] Control network file transfer rate

Yifei Zeng mac.ibook at gmail.com
Thu Feb 23 09:32:19 UTC 2006


Hi all.

I am writing a peer-to-peer file sharing application in Java.

Could someone help me with how to control the download/upload rate of  
the file transfer (practically) through internet?

just like the BitTorrent clients (Bitcomet, Azureus), most of them  
have the function for the user to set the download / upload rate limit.

How should I do in java to achieve this? Can someone please give me  
some ideas or hints?

I am currently using non-blocking IO and socket and for each file  
transfer between two peers there is a non-blocking socket associated  
with it. And my application only has single thread to achieve all  
socket read / write request.

Thanks

Yifei



More information about the P2p-hackers mailing list