locked
Background Bittorrent download. RRS feed

  • Question

  • Good evening everyone.

    I have to develop an application that can download large files thanks to the Bittorrent protocol.

    The Bittorrent part is functional, but I would like the downloads can be performed in the background.  Because of BackgroundTransferts are not adapted to bittorrent protocol, is there an alternative way to reach my goal? (The goal is to continue to download my files even if the application is suspended, or find a way for the application is not suspended).

    I spotted an application that manages to do a similar thing (Torrex), but the author refuses to divulge its secrets ^^'

    In advance thank you.

    Sunday, October 20, 2013 7:28 PM

Answers

All replies

  • Hi Truitemouth

    BitTorrent is not supported by BackgroundTransfer, but BackgroundTransfer do have the same function, see DownloadOperation class you could do following actions:

    Pause Pauses a download operation.
    Resume Resumes a paused download operation.
    StartAsync Starts an asynchronous download operation.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Monday, October 21, 2013 9:24 AM edit
    Monday, October 21, 2013 9:00 AM
  • Hi,

    The DownloadOperation class is unfortunately not suitable for a P2P context. It only allows the uploading/downloading of file on a remote server (plumbing in Bittorrent is a little more complex).

    Monday, October 21, 2013 9:20 AM
  • Hi, Truitemouth

    You are right, BitTorrent is not supported by BackgroundTransfer.

    I suggest you can register a Background Task to implement a Background download. And you can use StreamSocket to support network communication over Bittorrent download.

    See How to supporting your app with background tasks:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh977055.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/jj553413.aspx

    Refer to the links below to get more information about StreamSocket:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj150599.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.sockets.streamsocket.aspx

    http://code.msdn.microsoft.com/windowsapps/StreamSocket-Sample-8c573931

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, October 24, 2013 3:42 AM edit
    • Marked as answer by Anne Jing Tuesday, October 29, 2013 9:09 AM
    Thursday, October 24, 2013 3:41 AM
  • Take a look at the Background Networking white paper for more information about doing networking from a Background Task. The ControlChannelTrigger is probably what you want. Note that the goal of the ControlChannelTrigger is to enable low power intermittent network connections (like email notifications), not high usage scenarios like downloads. You may want to disable your downloading when on battery, etc. (with the possibility of letting users opt into running on battery).

    --Rob

    • Marked as answer by Anne Jing Tuesday, October 29, 2013 9:09 AM
    Thursday, October 24, 2013 6:57 AM
    Moderator
  • From what I've read, the backgrounds tasks are limited in terms of refresh period (> 15 minutes), data can be transferred (<0.5 MB), execution time (<2 seconds) and CPU usage.
    But I'll keep digging.

    Thank you for your answers ^^

    Thursday, October 24, 2013 7:09 AM