Changeset 11094

Show
Ignore:
Timestamp:
05/20/2008 11:47:15 PM (5 months ago)
Author:
dave
Message:

packed --> compact. Require compact=1 to return compact format.

Files:
1 modified

Legend:

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

    r11083 r11094  
    11BEP: 23 
    2 Title: Tracker Returns Packed Peer Lists 
     2Title: Tracker Returns Compact Peer Lists 
    33Version: $Revision$ 
    44Last-Modified: $Date$ 
     
    1717computational requirements in trackers, trackers may return 
    1818peers as a packed string rather than as a bencoded list. 
     19 
     20The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 
     21NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and 
     22"OPTIONAL" in this document are to be interpreted as described in 
     23IETF RFC 2119 [#RFC-2119]_. 
    1924 
    2025 
     
    3641 
    3742:: 
     43 
    3844  total peer list length in bytes < n * ( 23 + 259 + 7 )   
    3945 
    40 It is common now to use a packed format where each peer is represented 
     46It is common now to use a compact format where each peer is represented 
    4147using only 6 bytes.  The first 4 bytes contain the 32-bit ipv4 address. 
    4248The remaining two bytes contain the port number.  Both address and port 
    4349use network-byte order. 
    4450 
    45 The packed format uses the same *peers* key in the bencoded tracker 
     51When the client's announce URL contains *compact=1* the tracker MAY 
     52return the peers using compact format.  When *compact=0* or it is not 
     53specified then the tracker MUST return using the original format 
     54described in [#BEP-3]_.  For example,  
     55 
     56:: 
     57 
     58  GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&info_hash=aaaaaaaaaaaaaaaaaaaa 
     59  &port=6881&left=0&downloaded=100&uploaded=0&compact=1 
     60 
     61The compact format uses the same *peers* key in the bencoded tracker 
    4662response, but the value is a bencoded string rather than a bencoded 
    4763list. 
    4864 
    49 The peer id does not appear in the packed format.  The format has been 
     65The peer id does not appear in the compact format.  The format has been 
    5066in use for years and the lack of a peer id has posed no problems. 
    5167 
    52 This packed format is supported by BitTorrent mainline, Azureus, 
     68This compact format is supported by BitTorrent mainline, Azureus, 
    5369libtorrent, uTorrent, and probably most other clients. 
    5470 
     
    6278.. [#RFC-1034] RFC-1034. DOMAIN NAMES - CONCEPTS AND FACILITIES. Mockapetris, 
    6379   November 1987. (http://tools.ietf.org/html/rfc1034) 
     80 
     81.. [#RFC-2119] RFC-2119. (http://www.ietf.org/rfc/rfc2119.txt) 
     82 
    6483 
    6584Copyright