*** empty log message ***
This commit is contained in:
@@ -5,11 +5,20 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" />
|
<meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" />
|
||||||
<title>libtorrent manual</title>
|
<title>libtorrent manual</title>
|
||||||
|
<meta name="author" content="Arvid Norberg, c99ang@cs.umu.se" />
|
||||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="document" id="libtorrent-manual">
|
<div class="document" id="libtorrent-manual">
|
||||||
<h1 class="title">libtorrent manual</h1>
|
<h1 class="title">libtorrent manual</h1>
|
||||||
|
<table class="docinfo" frame="void" rules="none">
|
||||||
|
<col class="docinfo-name" />
|
||||||
|
<col class="docinfo-content" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<tr><th class="docinfo-name">Author:</th>
|
||||||
|
<td>Arvid Norberg, <a class="last reference" href="mailto:c99ang@cs.umu.se">c99ang@cs.umu.se</a></td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<div class="contents topic" id="contents">
|
<div class="contents topic" id="contents">
|
||||||
<p class="topic-title first"><a name="contents">Contents</a></p>
|
<p class="topic-title first"><a name="contents">Contents</a></p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
libtorrent manual
|
libtorrent manual
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
:Author: Arvid Norberg, c99ang@cs.umu.se
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
introduction
|
introduction
|
||||||
|
@@ -222,6 +222,7 @@ namespace libtorrent
|
|||||||
|
|
||||||
// forcefully sets next_announce to the current time
|
// forcefully sets next_announce to the current time
|
||||||
void force_tracker_request();
|
void force_tracker_request();
|
||||||
|
void force_tracker_request(boost::posix_time::ptime);
|
||||||
|
|
||||||
// sets the username and password that will be sent to
|
// sets the username and password that will be sent to
|
||||||
// the tracker
|
// the tracker
|
||||||
@@ -501,10 +502,17 @@ namespace libtorrent
|
|||||||
|
|
||||||
inline void torrent::force_tracker_request()
|
inline void torrent::force_tracker_request()
|
||||||
{
|
{
|
||||||
namespace time = boost::posix_time;
|
using boost::posix_time::second_clock;
|
||||||
m_next_request = time::second_clock::universal_time();
|
m_next_request = second_clock::universal_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void torrent::force_tracker_request(boost::posix_time::ptime t)
|
||||||
|
{
|
||||||
|
namespace time = boost::posix_time;
|
||||||
|
m_next_request = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void torrent::set_tracker_login(
|
inline void torrent::set_tracker_login(
|
||||||
std::string const& name
|
std::string const& name
|
||||||
, std::string const& pw)
|
, std::string const& pw)
|
||||||
|
@@ -225,6 +225,12 @@ namespace libtorrent
|
|||||||
// (make a rerequest from the tracker)
|
// (make a rerequest from the tracker)
|
||||||
void force_reannounce() const;
|
void force_reannounce() const;
|
||||||
|
|
||||||
|
// forces a reannounce in the specified amount of time.
|
||||||
|
// This overrides the default announce interval, and no
|
||||||
|
// announce will take place until the given time has
|
||||||
|
// timed out.
|
||||||
|
void force_reannounce(boost::posix_time::time_duration) const;
|
||||||
|
|
||||||
// TODO: add a feature where the user can tell the torrent
|
// TODO: add a feature where the user can tell the torrent
|
||||||
// to finish all pieces currently in the pipeline, and then
|
// to finish all pieces currently in the pipeline, and then
|
||||||
// abort the torrent.
|
// abort the torrent.
|
||||||
|
@@ -510,6 +510,22 @@ namespace libtorrent
|
|||||||
t->get_policy().peer_from_tracker(adr, id);
|
t->get_policy().peer_from_tracker(adr, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void torrent_handle::force_reannounce(
|
||||||
|
boost::posix_time::time_duration duration) const
|
||||||
|
{
|
||||||
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
if (m_ses == 0) throw invalid_handle();
|
||||||
|
|
||||||
|
boost::mutex::scoped_lock l(m_ses->m_mutex);
|
||||||
|
torrent* t = m_ses->find_torrent(m_info_hash);
|
||||||
|
if (t == 0) throw invalid_handle();
|
||||||
|
|
||||||
|
using boost::posix_time::second_clock;
|
||||||
|
t->force_tracker_request(second_clock::universal_time()
|
||||||
|
+ duration);
|
||||||
|
}
|
||||||
|
|
||||||
void torrent_handle::force_reannounce() const
|
void torrent_handle::force_reannounce() const
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
Reference in New Issue
Block a user