Net::BitTorrent::Session - Class Representing a Single .torrent File
new ( { [ARGS] } )
Creates a Net::BitTorrent::Session object. This constructor is called by Net::BitTorrent::add_session( ) and should not be used directly.
Net::BitTorrent::Session
new( ) accepts arguments as a hash, using key-value pairs:
new( )
BaseDir
The root directory used to store the files related to this session. This directory is created if not preexisting.
This is the only optional parameter.
Default: ./ (Current working directory)
./
Client
The Net::BitTorrent object this session will eventually be served from.
Path
Filename of the .torrent file to load.
bitfield
Returns a bitfield representing the pieces that have been successfully downloaded.
files
Returns a list of Net::BitTorrent::Session::File objects representing all files contained in the related .torrent file.
hashcheck
Verifies the integrity of all files associated with this session.
This is a blocking method; all processing will stop until this function returns.
infohash
Returns the 20 byte SHA1 hash used to identify this session internally, with trackers, and with remote peers.
path
Returns the filename of the torrent this object represents.
size
Returns the total size of all files listed in the .torrent file.
trackers
Returns a list of all Net::BitTorrent::Session::Tracker objects related to the session.
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
CPAN ID: SANKO
Copyright (C) 2008 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.
To install Net::BitTorrent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::BitTorrent
CPAN shell
perl -MCPAN -e shell install Net::BitTorrent
For more information on module installation, please visit the detailed CPAN module installation guide.