GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::BITTORRENT::UTIL (3)

.ds Aq ’

NAME

Net::BitTorrent::Util - BitTorrent Related Utility Functions

CONTENTS

Importing From Net::BitTorrent::Util

By default, nothing is exported.

You may import any of the following or use one or more of these tags:
:all Everything is imported into your namespace.
:bencode You get the two Bencode-related functions: bencode and bdecode. For more on Bencoding, see the BitTorrent Protocol documentation.
:compact Imports the tracker response-related functions compact and uncompact.

Functions

bencode ( ARGS ) Expects a single value (basic scalar, array reference, or hash reference) and returns a single string.

Bencoding is the BitTorrent protocol’s basic serialization and data organization format. The specification supports integers, lists (arrays), dictionaries (hashes), and byte strings.

bdecode ( STRING ) Expects a bencoded string. The return value depends on the type of data contained in the string.
compact ( 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 ( STRING ) Inflates a compacted string of peers and returns a list of IPv4:port strings.

See Also

The BitTorrent Protocol Specification http://bittorrent.org/beps/bep_0003.html#the-connectivity-is-as-follows
BEP 32: Tracker Returns Compact Peer Lists http://bittorrent.org/beps/bep_0023.html
Other Bencode related modules:
Convert::Bencode
Bencode
Convert::Bencode_XS

Author

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

CPAN ID: SANKO

License and Legal

Copyright (C) 2008-2009 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::BITTORRENT::UTIL (3) 2016-03-18

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.