Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (48 sloc) 2.057 kb
Name
Net::BitTorrent - BitTorrent peer-to-peer protocol class
Synopsis
use Net::BitTorrent;
my $client = Net::BitTorrent->new();
$client->on_event(
q[piece_hash_pass],
sub {
my ($self, $args) = @_;
printf(qq[pass: piece number %04d of %s\n],
$args->{q[Index]}, $args->{q[Torrent]}->infohash);
}
);
my $torrent = $client->add_torrent({Path => q[a.legal.torrent]})
or die q[Cannot load .torrent];
$torrent->hashcheck; # Verify any existing data
$client->do_one_loop() while 1;
Description
"Net::BitTorrent" is a class based implementation of the current
BitTorrent Protocol Specification. Each "Net::BitTorrent" object is
capable of handling several concurrent .torrent sessions.
Installation
This distribution uses "Module::Build" for installation, so use the
following procedure:
perl Build.PL
./Build
./Build test
./Build install
Bugs
Please see the Todo file included with this distribution,
perldoc Net::BitTorrent, and perldoc Net::BitTorrent::TODO, and
http://sankorobinson.com/net-bittorrent/ for more information.
Author
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
CPAN ID: SANKO
License and Legal
Copyright (C) 2008-2009 by Sanko Robinson <sanko@cpan.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
http://www.perlfoundation.org/artistic_license_2_0. For clarification,
see http://www.perlfoundation.org/artistic_2_0_notes.
When separated from the distribution, all POD documentation is covered
by the Creative Commons Attribution-Share Alike 3.0 License. See
http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For
clarification, see http://creativecommons.org/licenses/by-sa/3.0/us/.
Neither this module nor the Author is affiliated with BitTorrent, Inc.
$Id$
Jump to Line
Something went wrong with that request. Please try again.