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

NAME

Net::BitTorrent::Protocol::BEP23::Compact - Utility functions for BEP32: Tracker Returns Compact Peer Lists

Importing From Net::BitTorrent::Protocol::BEP23::Compact

By default, nothing is exported.

You may import any of the following or use one or more of these tag:

:all

Imports the tracker response-related functions compact and uncompact.

Functions

compact_ipv4 ( LIST )

Compacts a list of IPv4:port strings into a single string.

A compact peer is 6 bytes; the first four bytes are the host (in network byte order), the last two bytes are the port (again, in network byte order).

uncompact_ipv4 ( STRING )

Inflates a compacted string of peers and returns a list of IPv4:port strings.

See Also

BEP 32: Tracker Returns Compact Peer Lists

http://bittorrent.org/beps/bep_0023.html

Author

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

CPAN ID: SANKO

License and Legal

Copyright (C) 2008-2010 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 notes on the Artistic License 2.0 for clarification.

When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.

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