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 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: [id://317520], Net::BitTorrent::as_string()

bitfield ( )

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

client ( )

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

downloaded ( )

Returns the total amount of data downloaded from this peer.

See also: uploaded ( )

incoming_connection ( )

Returns a boolean indicating who initiated this connection.

is_choked ( )

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

is_choking ( )

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

is_interested ( )

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

is_interesting ( )

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

outgoing_requests ( )

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

peer_id ( )

Returns the Peer ID used to identify this peer.

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

peerhost ( )

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

peerport ( )

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

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)

session ( )

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

uploaded ( )

Returns the total amount of data uploaded to this peer.

See also: 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 itself. See http://www.perl.com/perl/misc/Artistic.html or the LICENSE file included with this module.

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.