0

Hello Python friends I am developing a commercial application in python that backs up databases, directory synchronization, finally ... I need to implement a bandwidth limit feature. For example the user defines that the software cannot exceed 40kbps for upload.

I know there is a way to do it because the Dropbox client is written in python and has this functionality.

I searched the net how to implement this in other languages, I even found an example using lib Twisted, but it doesn't fit my case, because data can be configured to send to multiple clouds, AWS, Google Cloud, FTP, Google Drive, and more. The only solution left for me was to hook the Windows API, specifically the WinSock API, to intercept system calls to send, recv and similar functions and implement my own bandwidth limiter, but this is going to be so complicated to implement.

Does anyone have any ideas how to help me?

After a little o research I found this question Adjust speed of Socket, maybe Dropbox use that... I tried and works like a charm, but as I said, this not fit in my case, because I send to multiple clouds, is Hooking Windows API the only solution or anyone has another idea?

;)

0 Answers0