02 Oct 2016 12:29:35 UTC
- Distribution: Net-BitTorrent-Protocol
- Module version: v1.5.3
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (531 / 45 / 56)
- KwaliteeBus factor: 1
- 86.44% Coverage
- License: artistic_2
- Perl: v5.16.0
- Activity24 month
- Download (35.46KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- Importing From Net::BitTorrent::Protocol::BEP09
- Magnet URI Format
- See Also
- License and Legal
Net::BitTorrent::Protocol::BEP09 - Packet Utilities for BEP09: The Extention for Peers to Send Metadata Files
The purpose of this extension is to allow clients to join a swarm and complete a download without the need of downloading a .torrent file first. This extension instead allows clients to download the metadata from peers. It makes it possible to support magnet links, a link on a web page only containing enough information to join the swarm (the info hash).
This metadata extiontion uses the extention protocol to advertise its existence. It adds the
ut_metadataentry to the
mdictionary in the extention header handshake message. It also adds
metadata_sizeto the handshake message (not the
mdictionary) specifiying an integer value of the number of bytes of the metadata.
By default, nothing is exported.
You may import any of the following or use one or more of these tag:
Imports everything. If you're importing anything, this is probably what you want.
Imports the functions which generate messages.
Note that there are no parser functions as the packets generated for BEP09 are simple bencoded hashes. Use the bedecoder in BEP03.
This extention is very simple; there's a single request packet type and only two possible reply packet types:
build_metadata_request( $index )
Generates an appropriate request for a subpiece of the torrent's metadata.
build_metadata_data( $index, $piece )
Generates an appropriate reply to a request query.
build_metadata_reject( $index, $piece )
Generates an appropriate reply to a request query if the requested piece is not available.
The magnet URI format is:
info-hashis the infohash, hex encoded, for a total of
40characters. For compatability with existing links in the wild, clients should also support the
32character base32 encoded infohash.
Sanko Robinson <email@example.com> - http://sankorobinson.com/
CPAN ID: SANKO
Copyright (C) 2010-2014 by Sanko Robinson <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.
Neither this module nor the Author is affiliated with BitTorrent, Inc.
Module Install Instructions
To install Net::BitTorrent::Protocol, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Net::BitTorrent::Protocol
For more information on module installation, please visit the detailed CPAN module installation guide.