[Libtorrent-devel] how to open and start a download in source code

Nemo gb.baby at gmail.com
Mon Dec 1 09:02:50 UTC 2008


i want get "auto open/close torrent" function via modify libtorrent  source
code.

i can auto stop a torrent now, when erase a peer ( in
ConnectionList::iterator ConnectionList::erase(iterator pos, int flags) ) ,
check size of connectionlist, close (Download::stop() and Download::close())
torrent when size is 0.

libtorent will throw a handshake error when libtorrent get a request of
handshake and the torrent  requested is not active in original source code,
i modify code here hope open the torrent complete handshake and download
instead of throw error.
i got problem here, i can open a torrent via call  Download::open(), but i
got a "Tried to start an unchecked download" error if call Download::start()
directly and skip Download::hash_check(). i do not know how to use
hash_check() here, who can  give me some suggestion how to open and start a
download, i am a newbie and sorry for my poor english.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rakshasa.no/pipermail/libtorrent-devel/attachments/20081201/268f60d1/attachment.html


More information about the Libtorrent-devel mailing list