How to make use of URL class to cancel download thread?


#1

Hi, all
I met a scenario as follows:
a GUI pass some URL to my program(plugin), and I create a downloadThread to start downloading from server using that URL.

Is there any way I can cancel the download by sending msg to server using URL class.

I tried to stop and delete the download thread in plugin. However, it takes some time to cancel, and degrading performance due to I have multiple files download at the same time. The downloading speed for each files decrease while adding more downloading thread.
If we can cancel the download connection on server, it may be faster.

Best
Leon