Changeset 11094
- Timestamp:
- 05/20/2008 11:47:15 PM (5 months ago)
- Files:
-
- 1 modified
-
dotorg/trunk/html/beps/bep_0023.rst (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/beps/bep_0023.rst
r11083 r11094 1 1 BEP: 23 2 Title: Tracker Returns PackedPeer Lists2 Title: Tracker Returns Compact Peer Lists 3 3 Version: $Revision$ 4 4 Last-Modified: $Date$ … … 17 17 computational requirements in trackers, trackers may return 18 18 peers as a packed string rather than as a bencoded list. 19 20 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 21 NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 22 "OPTIONAL" in this document are to be interpreted as described in 23 IETF RFC 2119 [#RFC-2119]_. 19 24 20 25 … … 36 41 37 42 :: 43 38 44 total peer list length in bytes < n * ( 23 + 259 + 7 ) 39 45 40 It is common now to use a packedformat where each peer is represented46 It is common now to use a compact format where each peer is represented 41 47 using only 6 bytes. The first 4 bytes contain the 32-bit ipv4 address. 42 48 The remaining two bytes contain the port number. Both address and port 43 49 use network-byte order. 44 50 45 The packed format uses the same *peers* key in the bencoded tracker 51 When the client's announce URL contains *compact=1* the tracker MAY 52 return the peers using compact format. When *compact=0* or it is not 53 specified then the tracker MUST return using the original format 54 described 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 61 The compact format uses the same *peers* key in the bencoded tracker 46 62 response, but the value is a bencoded string rather than a bencoded 47 63 list. 48 64 49 The peer id does not appear in the packedformat. The format has been65 The peer id does not appear in the compact format. The format has been 50 66 in use for years and the lack of a peer id has posed no problems. 51 67 52 This packedformat is supported by BitTorrent mainline, Azureus,68 This compact format is supported by BitTorrent mainline, Azureus, 53 69 libtorrent, uTorrent, and probably most other clients. 54 70 … … 62 78 .. [#RFC-1034] RFC-1034. DOMAIN NAMES - CONCEPTS AND FACILITIES. Mockapetris, 63 79 November 1987. (http://tools.ietf.org/html/rfc1034) 80 81 .. [#RFC-2119] RFC-2119. (http://www.ietf.org/rfc/rfc2119.txt) 82 64 83 65 84 Copyright