The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::BitTorrent::Session::Peer - Remote BitTorrent Peer

Constructor

new ( { [ARGS] } )

Creates a Net::BitTorrent::Session::Peer object. This constructor should not be used directly.

Methods

as_string ( [ VERBOSE ] )

Returns a 'ready to print' dump of the Net::BitTorrent::Session::Peer object's data structure. If called in void context, the structure is printed to STDERR.

See also: Net::BitTorrent

get_bitfield ( )

Returns the bitfield representing the pieces this peer claims to have successfully downloaded.

get_client ( )

Returns the Net::BitTorrent object related to this peer.

get_downloaded ( )

Returns the total amount of data downloaded from this peer.

See also: get_uploaded ( )

get_incoming_connection ( )

Returns a boolean indicating who initiated this connection.

get_is_choked ( )

Returns a boolean indicating whether or not we are choking this peer.

get_is_choking ( )

Returns a boolean indicating whether or not we are being choked by this peer.

get_is_interested ( )

Returns a boolean indicating whether or not this peer is interested in downloading pieces from us.

get_is_interesting ( )

Returns a boolean indicating whether or not we are interested in this peer.

get_outgoing_requests ( )

Returns a list of Net::BitTorrent::Session::Peer::Request objects representing blocks this peer has asked us for.

See Also: Net::BitTorrent Net::BitTorrent

get_peer_id ( )

Returns the Peer ID used to identify this peer.

See also: theory.org (http://tinyurl.com/4a9cuv)

get_peerhost ( )

Return the address part of the sockaddr structure for the socket on the peer host in a text form xx.xx.xx.xx

get_peerport ( )

Return the port number for the socket on the peer host.

get_reserved ( )

Returns the eight (8) byte string the peer sent us as part of the BitTorrent handshake.

See also: theory.org (http://tinyurl.com/3lo5oj)

get_session ( )

Returns the Net::BitTorrent::Session object related to this peer.

get_uploaded ( )

Returns the total amount of data uploaded to this peer.

See also: get_downloaded ( )

Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

CPAN ID: SANKO

License and Legal

Copyright 2008 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10 (or higher). See http://www.perl.com/perl/misc/Artistic.html or the LICENSE file included with this distribution.

All POD documentation is covered by the Creative Commons Attribution- Noncommercial-Share Alike 3.0 License (http://creativecommons.org/licenses/by-nc-sa/3.0/us/).

Neither this module nor the Author is affiliated with BitTorrent, Inc.