Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Basic, Protocol-level BitTorrent Utilities

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 Build.PL
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 README
Octocat-spinner-32 TODO
    Net::BitTorrent::Protocol - Basic, Protocol-level BitTorrent Utilities

        use Net::BitTorrent::Protocol;
        # TODO

    In addition to the functions found in Net::BitTorrent::Protocol::BEP03,
    Net::BitTorrent::Protocol::BEP06, Net::BitTorrent::Protocol::BEP07,
    Net::BitTorrent::Protocol::BEP10, Net::BitTorrent::Protocol::BEP23,
    TODO..., a function which wraps all the packet parsing functions is

    `parse_packet( \$data )'
        Attempts to parse any known packet from the data (a scalar ref)
        passed to it. On success, the payload and type are returned and the
        packet is removed from the incoming data reference. `undef' is
        returned on failure and the data in the reference is unchanged.

Importing from Net::BitTorrent::Protocol
    You may import from this module manually...

        use Net::BitTorrent::Protocol 'build_handshake';

    ...or by using one or more of the provided tags:

        use Net::BitTorrent::Protocol ':all';

    Supported tags include...

        Imports everything.

        Imports all packet building functions from BEP03, BEP03, BEP06, and

        Imports the bencode and bdecode functions found in BEP03.

        Imports the compact and inflation functions for IPv4 (BEP23) and
        IPv6 (BEP07) peer lists.

        Imports all functions related to BEP05.

        Imports all packet parsing functions from BEP03, BEP06, and BEP10 as
        well as the locally defined `parse_packet( ... )' function.

        Imports the packet type values from BEP03, BEP06, and BEP10.

        Imports the utility functions from BEP06. =back

See Also
        AnyEvent::BitTorrent - Simple client which uses
        Net::BitTorrent::Protocol - The BitTorrent Protocol
        Specification - Fast Extension - Extension Protocol - An annotated guide
        to the BitTorrent protocol

        Net::BitTorrent::PeerPacket - by Joshua McAdams

        Protocol::BitTorrent - by Tom Molesworth

        Sanko Robinson <> -

        CPAN ID: SANKO

License and Legal
        Copyright (C) 2008-2012 by Sanko Robinson <>

        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,

Something went wrong with that request. Please try again.