no message

This commit is contained in:
spyhole 2005-08-01 13:34:51 +00:00
parent b1bacc078e
commit 3a4a63c566
3 changed files with 22 additions and 1 deletions

View File

@ -245,7 +245,7 @@ namespace libtorrent
// forcefully sets next_announce to the current time
void force_tracker_request();
void force_tracker_request(boost::posix_time::ptime);
void force_tracker_request_on_loop(boost::posix_time::ptime);
// sets the username and password that will be sent to
// the tracker
void set_tracker_login(std::string const& name, std::string const& pw);
@ -550,6 +550,11 @@ namespace libtorrent
m_next_request = t;
}
inline void torrent::force_tracker_request_on_loop(boost::posix_time::ptime t)
{
namespace time = boost::posix_time;
m_next_request = t;
}
inline void torrent::set_tracker_login(
std::string const& name

View File

@ -261,6 +261,8 @@ namespace libtorrent
// timed out.
void force_reannounce(boost::posix_time::time_duration) const;
void force_reannounce_on_loop(boost::posix_time::time_duration) const;
// TODO: add a feature where the user can tell the torrent
// to finish all pieces currently in the pipeline, and then
// abort the torrent.

View File

@ -499,6 +499,20 @@ namespace libtorrent
t->get_policy().peer_from_tracker(adr, id);
}
//todo test the function body
void torrent_handle::force_reannounce_on_loop(
boost::posix_time::time_duration duration) const
{
INVARIANT_CHECK;
if (m_ses == 0) throw_invalid_handle();
//if (m_ses == 0) return;
force_reannounce(duration);
force_reannounce_on_loop(duration);
}
void torrent_handle::force_reannounce(
boost::posix_time::time_duration duration) const
{