*** empty log message ***

This commit is contained in:
Arvid Norberg
2004-01-31 10:20:19 +00:00
parent 03561913df
commit 5b7100656e
10 changed files with 119 additions and 65 deletions

View File

@@ -597,11 +597,13 @@ struct torrent_status
boost::posix_time::time_duration next_announce;
boost::posix_time::time_duration announce_interval;
std::size_t total_download;
std::size_t total_upload;
std::string current_tracker;
std::size_t total_payload_download;
std::size_t total_payload_upload;
size_type total_download;
size_type total_upload;
size_type total_payload_download;
size_type total_payload_upload;
float download_rate;
float upload_rate;
@@ -609,7 +611,7 @@ struct torrent_status
int num_peers;
const std::vector<bool>* pieces;
std::size_t total_done;
size_type total_done;
};
</pre>
<p><tt class="literal"><span class="pre">progress</span></tt> is a value in the range [0, 1], that represents the progress of the
@@ -649,6 +651,8 @@ is a pure seeder.</td>
<p><tt class="literal"><span class="pre">next_announce</span></tt> is the time until the torrent will announce itself to the tracker. And
<tt class="literal"><span class="pre">announce_interval</span></tt> is the time the tracker want us to wait until we announce ourself
again the next time.</p>
<p><tt class="literal"><span class="pre">current_tracker</span></tt> is the URL of the last working tracker. If no tracker request has
been successful yet, it's set to an empty string.</p>
<p><tt class="literal"><span class="pre">total_download</span></tt> and <tt class="literal"><span class="pre">total_upload</span></tt> is the number of bytes downloaded and
uploaded to all peers, accumulated, <em>this session</em> only.</p>
<p><tt class="literal"><span class="pre">total_payload_download</span></tt> and <tt class="literal"><span class="pre">total_payload_upload</span></tt> counts the amount of bytes
@@ -1146,38 +1150,52 @@ struct hash_failed_alert: alert
<div class="section" id="peer-error-alert">
<h2><a name="peer-error-alert">peer_error_alert</a></h2>
<p>This alert is generated when a peer sends invalid data over the peer-peer protocol. The peer
will be disconnected, but you get its peer-id from the alert. This alert is generated
as severity level <tt class="literal"><span class="pre">debug</span></tt>.</p>
will be disconnected, but you get its ip address from the alert, to identify it. This alert
is generated as severity level <tt class="literal"><span class="pre">debug</span></tt>.</p>
<pre class="literal-block">
struct peer_error_alert: alert
{
peer_error_alert(const peer_id&amp; pid, const std::string&amp; msg);
peer_error_alert(const address&amp; pid, const std::string&amp; msg);
virtual std::auto_ptr&lt;alert&gt; clone() const;
peer_id id;
address ip;
};
</pre>
</div>
<div class="section" id="invalid-request-alert">
<h2><a name="invalid-request-alert">invalid_request_alert</a></h2>
<p>This is a debug alert that is generated by an incoming invalid piece request. It is
generated as severity level <tt class="literal"><span class="pre">debug</span></tt>.</p>
<p>This is a debug alert that is generated by an incoming invalid piece request. The <tt class="literal"><span class="pre">handle</span></tt>
is a handle to the torrent the peer is a member of. <tt class="literal"><span class="pre">ìp</span></tt> is the address of the peer and the
<tt class="literal"><span class="pre">request</span></tt> is the actual incoming request from the peer. The alert is generated as severity level
<tt class="literal"><span class="pre">debug</span></tt>.</p>
<pre class="literal-block">
struct invalid_request_alert: alert
{
invalid_request_alert(
const peer_request&amp; r
, const torrent_handle&amp; h
, const peer_id&amp; send
, const address&amp; send
, const std::string&amp; msg);
virtual std::auto_ptr&lt;alert&gt; clone() const;
torrent_handle handle;
peer_id sender;
address ip;
peer_request request;
};
struct peer_request
{
int piece;
int start;
int length;
bool operator==(const peer_request&amp; r);
};
</pre>
<p>The <tt class="literal"><span class="pre">peer_request</span></tt> contains the values the client sent in its <tt class="literal"><span class="pre">request</span></tt> message. <tt class="literal"><span class="pre">piece</span></tt> is
the index of the piece it want data from, <tt class="literal"><span class="pre">start</span></tt> is the offset within the piece where the data
should be read, and <tt class="literal"><span class="pre">length</span></tt> is the amount of data it wants.</p>
</div>
<div class="section" id="torrent-finished-alert">
<h2><a name="torrent-finished-alert">torrent_finished_alert</a></h2>
@@ -1203,7 +1221,7 @@ This alert is generated when you receive a chat message from another peer. Chat
are supported as an extension ("chat"). It is generated as severity level ``critical``,
even though it doesn't necessarily require any user intervention, it's high priority
since you would almost never want to ignore such a message. The alert class contain
a torrent_handle_ to the torrent in which the sender-peer is a member and the peer_id
a torrent_handle_ to the torrent in which the sender-peer is a member and the ip
of the sending peer.
::
@@ -1211,13 +1229,13 @@ of the sending peer.
struct chat_message_alert: alert
{
chat_message_alert(const torrent_handle& h
, const peer_id& sender
, const address& sender
, const std::string& msg);
virtual std::auto_ptr<alert> clone() const;
torrent_handle handle;
peer_id sender;
address ip;
}; -->
</div>
<div class="section" id="dispatcher">

View File

@@ -595,11 +595,13 @@ It contains the following fields::
boost::posix_time::time_duration next_announce;
boost::posix_time::time_duration announce_interval;
std::size_t total_download;
std::size_t total_upload;
std::string current_tracker;
std::size_t total_payload_download;
std::size_t total_payload_upload;
size_type total_download;
size_type total_upload;
size_type total_payload_download;
size_type total_payload_upload;
float download_rate;
float upload_rate;
@@ -607,7 +609,7 @@ It contains the following fields::
int num_peers;
const std::vector<bool>* pieces;
std::size_t total_done;
size_type total_done;
};
``progress`` is a value in the range [0, 1], that represents the progress of the
@@ -643,6 +645,9 @@ current task is in the ``state`` member, it will be one of the following:
``announce_interval`` is the time the tracker want us to wait until we announce ourself
again the next time.
``current_tracker`` is the URL of the last working tracker. If no tracker request has
been successful yet, it's set to an empty string.
``total_download`` and ``total_upload`` is the number of bytes downloaded and
uploaded to all peers, accumulated, *this session* only.
@@ -1190,25 +1195,27 @@ peer_error_alert
----------------
This alert is generated when a peer sends invalid data over the peer-peer protocol. The peer
will be disconnected, but you get its peer-id from the alert. This alert is generated
as severity level ``debug``.
will be disconnected, but you get its ip address from the alert, to identify it. This alert
is generated as severity level ``debug``.
::
struct peer_error_alert: alert
{
peer_error_alert(const peer_id& pid, const std::string& msg);
peer_error_alert(const address& pid, const std::string& msg);
virtual std::auto_ptr<alert> clone() const;
peer_id id;
address ip;
};
invalid_request_alert
---------------------
This is a debug alert that is generated by an incoming invalid piece request. It is
generated as severity level ``debug``.
This is a debug alert that is generated by an incoming invalid piece request. The ``handle``
is a handle to the torrent the peer is a member of. ``<EFBFBD>p`` is the address of the peer and the
``request`` is the actual incoming request from the peer. The alert is generated as severity level
``debug``.
::
@@ -1217,17 +1224,30 @@ generated as severity level ``debug``.
invalid_request_alert(
const peer_request& r
, const torrent_handle& h
, const peer_id& send
, const address& send
, const std::string& msg);
virtual std::auto_ptr<alert> clone() const;
torrent_handle handle;
peer_id sender;
address ip;
peer_request request;
};
struct peer_request
{
int piece;
int start;
int length;
bool operator==(const peer_request& r);
};
The ``peer_request`` contains the values the client sent in its ``request`` message. ``piece`` is
the index of the piece it want data from, ``start`` is the offset within the piece where the data
should be read, and ``length`` is the amount of data it wants.
torrent_finished_alert
----------------------
@@ -1256,7 +1276,7 @@ torrent in question. This alert is generated as severity level ``info``.
are supported as an extension ("chat"). It is generated as severity level ``critical``,
even though it doesn't necessarily require any user intervention, it's high priority
since you would almost never want to ignore such a message. The alert class contain
a torrent_handle_ to the torrent in which the sender-peer is a member and the peer_id
a torrent_handle_ to the torrent in which the sender-peer is a member and the ip
of the sending peer.
::
@@ -1264,13 +1284,13 @@ torrent in question. This alert is generated as severity level ``info``.
struct chat_message_alert: alert
{
chat_message_alert(const torrent_handle& h
, const peer_id& sender
, const address& sender
, const std::string& msg);
virtual std::auto_ptr<alert> clone() const;
torrent_handle handle;
peer_id sender;
address ip;
};