P2P::pDonkey::Met - Perl extension for handling *.met files of eDonkey peer2peer protocol.
use P2P::pDonkey::Met ':server'; my $servers; my $p = readServerMet($ARGV[0]); if ($p) { printServerMet($p); } else { print "$ARGV[0] is not in server.met format\n"; } ... use P2P::pDonkey::Met ':part'; foreach my $f (@ARGV) { my $p = readPartMet($f); if ($p) { printPartMet($p); } else { print "$f is not in part.met format\n"; } } ... use P2P::pDonkey::Met ':known'; my $p = readKnownMet($ARGV[0]); if ($p) { printKnownMet($p); } else { print "$ARGV[0] is not in known.met format\n"; } ... use P2P::pDonkey::Met ':pref'; my $p = readPrefMet($ARGV[0]); if ($p) { printPrefMet($p); } else { print "$ARGV[0] is not in pref.met format\n"; }
The module provides functions for reading, printing and writing *.met files of eDonkey peer2peer protocol.
P2P::pDonkey::Met provides the subroutines for four types of met files: server.met, ...part.met, known.met, pref.met.
P2P::pDonkey::Met
Functions are tagged with ':server'.
Returns reference to unpacked server description structure.
Returns packed string for description $$p.
Prints server description to STDOUT.
Returns reference to new server description structure.
Returns reference to list of server descriptions.
Returns packed string for list of descriptions @$l.
Prints items of list @$l to STDOUT.
Returns reference to hash of server descriptions. Keys are idAddr($ip, $port).
Returns packed string for hash of descriptions %$h.
Prints values of hash %$h to STDOUT.
Returns reference to hash of server descriptions.
Returns packed string in server.met file format.
Alias to printServerDescListU($buffer, $offset).
Reads file and unpacks data with unpackServerMet() function.
Packs %$h with packServerMet() function and writes to file.
Functions are tagged with ':part'.
Returns reference to file information structure.
Returns packed string in part.met format.
Prints file information to STDOUT.
Reads file and unpacks data with unpackPartMet() function.
Packs $$p with packPartMet() function and writes to file.
Functions are tagged with ':known'.
Returns reference to list of file information structures.
Returns packed string in known.met format.
Prints elements of list @$l to STDOUT.
Reads file and unpacks data with unpackKnownMet() function.
Packs @$p with packKnownMet() function and writes to file.
Functions are tagged with ':pref'.
Returns reference to hash: IP => $ip Port => $port Hash => $hash Meta => $meta Pref => $pref
Returns packed string in pref.met format.
Print file information to STDOUT.
Reads file and unpacks data with unpackPrefMet() function.
Packs $$p with packPrefMet() function and writes to file.
None by default.
Alexey Klimkin, <klimkin@mail.ru>
perl, P2P::pDonkey::Meta.
eDonkey home:
<http://www.edonkey2000.com/>
Basic protocol information:
<http://hitech.dk/donkeyprotocol.html> <http://www.schrevel.com/edonkey/>
Client stuff:
<http://www.emule-project.net/> <http://www.nongnu.org/mldonkey/>
Server stuff:
<http://www.thedonkeynetwork.com/>
To install P2P::pDonkey::Met, copy and paste the appropriate command in to your terminal.
cpanm
cpanm P2P::pDonkey::Met
CPAN shell
perl -MCPAN -e shell install P2P::pDonkey::Met
For more information on module installation, please visit the detailed CPAN module installation guide.