Show
Ignore:
Timestamp:
05/21/2008 12:01:40 AM (6 months ago)
Author:
dave
Message:

regenerated html

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dotorg/trunk/html/beps/bep_0023.html

    r11084 r11097  
    3737<tr class="field"><th class="field-name">BEP:</th><td class="field-body">23</td> 
    3838</tr> 
    39 <tr class="field"><th class="field-name">Title:</th><td class="field-body">Tracker Returns Packed Peer Lists</td> 
     39<tr class="field"><th class="field-name">Title:</th><td class="field-body">Tracker Returns Compact Peer Lists</td> 
    4040</tr> 
    4141<tr class="field"><th class="field-name">Version:</th><td class="field-body">11083</td> 
     
    6161<p class="topic-title first">Contents</p> 
    6262<ul class="simple"> 
    63 <li><a class="reference internal" href="#abstract" id="id3">Abstract</a></li> 
    64 <li><a class="reference internal" href="#overview" id="id4">Overview</a></li> 
    65 <li><a class="reference internal" href="#references" id="id5">References</a></li> 
    66 <li><a class="reference internal" href="#copyright" id="id6">Copyright</a></li> 
     63<li><a class="reference internal" href="#abstract" id="id5">Abstract</a></li> 
     64<li><a class="reference internal" href="#overview" id="id6">Overview</a></li> 
     65<li><a class="reference internal" href="#references" id="id7">References</a></li> 
     66<li><a class="reference internal" href="#copyright" id="id8">Copyright</a></li> 
    6767</ul> 
    6868</div> 
     
    7272computational requirements in trackers, trackers may return 
    7373peers as a packed string rather than as a bencoded list.</p> 
     74<p>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL 
     75NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and 
     76&quot;OPTIONAL&quot; in this document are to be interpreted as described in 
     77IETF <a class="reference external" href="http://www.faqs.org/rfcs/rfc2119.html">RFC 2119</a> <a class="footnote-reference" href="#rfc-2119" id="id1">[3]</a>.</p> 
    7478</div> 
    7579<div class="section" id="overview"> 
    7680<h1>Overview</h1> 
    77 <p>In BitTorrent as described in BEP 3 <a class="footnote-reference" href="#bep-3" id="id1">[1]</a>, peers wishing to 
     81<p>In BitTorrent as described in BEP 3 <a class="footnote-reference" href="#bep-3" id="id2">[1]</a>, peers wishing to 
    7882transfer a file contact a central tracker.  This tracker returns a 
    7983list of peers that are currently transferring the file.  The list of 
     
    8387containing a domain name or an IP address, and an integer port number. 
    8488The <em>ip</em> is variable length, but since in its longest form it is a 
    85 domain name it cannot exceed 255 bytes <a class="footnote-reference" href="#rfc-1034" id="id2">[2]</a> plus 4 bytes 
     89domain name it cannot exceed 255 bytes <a class="footnote-reference" href="#rfc-1034" id="id3">[2]</a> plus 4 bytes 
    8690bencoding overhead.  Bencoded integers are also variable length but 
    8791since it is a port number, it cannot be more than 7 bytes including 
    8892bencoding overhead.  Thus,</p> 
    89 <dl class="docutils"> 
    90 <dt>::</dt> 
    91 <dd>total peer list length in bytes &lt; n * ( 23 + 259 + 7 )</dd> 
    92 </dl> 
    93 <p>It is common now to use a packed format where each peer is represented 
     93<pre class="literal-block"> 
     94total peer list length in bytes &lt; n * ( 23 + 259 + 7 ) 
     95</pre> 
     96<p>It is common now to use a compact format where each peer is represented 
    9497using only 6 bytes.  The first 4 bytes contain the 32-bit ipv4 address. 
    9598The remaining two bytes contain the port number.  Both address and port 
    9699use network-byte order.</p> 
    97 <p>The packed format uses the same <em>peers</em> key in the bencoded tracker 
     100<p>When the client's announce URL contains <em>compact=1</em> the tracker MAY 
     101return the peers using compact format.  When <em>compact=0</em> or it is not 
     102specified then the tracker MUST return using the original format 
     103described in <a class="footnote-reference" href="#bep-3" id="id4">[1]</a>.  For example,</p> 
     104<pre class="literal-block"> 
     105GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa 
     106&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1 
     107</pre> 
     108<p>The compact format uses the same <em>peers</em> key in the bencoded tracker 
    98109response, but the value is a bencoded string rather than a bencoded 
    99110list.</p> 
    100 <p>The peer id does not appear in the packed format.  The format has been 
     111<p>The peer id does not appear in the compact format.  The format has been 
    101112in use for years and the lack of a peer id has posed no problems.</p> 
    102 <p>This packed format is supported by BitTorrent mainline, Azureus, 
     113<p>This compact format is supported by BitTorrent mainline, Azureus, 
    103114libtorrent, uTorrent, and probably most other clients.</p> 
    104115</div> 
     
    108119<colgroup><col class="label" /><col /></colgroup> 
    109120<tbody valign="top"> 
    110 <tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>BEP_0003. The BitTorrent Protocol Specification, Cohen 
     121<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#id2">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> BEP_0003. The BitTorrent Protocol Specification, Cohen 
    111122(<a class="reference external" href="http://www.bittorrent.org/beps/bep_0003.html">http://www.bittorrent.org/beps/bep_0003.html</a>)</td></tr> 
    112123</tbody> 
     
    115126<colgroup><col class="label" /><col /></colgroup> 
    116127<tbody valign="top"> 
    117 <tr><td class="label"><a class="fn-backref" href="#id2">[2]</a></td><td><a class="reference external" href="http://www.faqs.org/rfcs/rfc1034.html">RFC-1034</a>. DOMAIN NAMES - CONCEPTS AND FACILITIES. Mockapetris, 
     128<tr><td class="label"><a class="fn-backref" href="#id3">[2]</a></td><td><a class="reference external" href="http://www.faqs.org/rfcs/rfc1034.html">RFC-1034</a>. DOMAIN NAMES - CONCEPTS AND FACILITIES. Mockapetris, 
    118129November 1987. (<a class="reference external" href="http://tools.ietf.org/html/rfc1034">http://tools.ietf.org/html/rfc1034</a>)</td></tr> 
     130</tbody> 
     131</table> 
     132<table class="docutils footnote" frame="void" id="rfc-2119" rules="none"> 
     133<colgroup><col class="label" /><col /></colgroup> 
     134<tbody valign="top"> 
     135<tr><td class="label"><a class="fn-backref" href="#id1">[3]</a></td><td><a class="reference external" href="http://www.faqs.org/rfcs/rfc2119.html">RFC-2119</a>. (<a class="reference external" href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>)</td></tr> 
    119136</tbody> 
    120137</table>