Permalink
Browse files

Add support for BEP05 (DHT Protocol) packets

  • Loading branch information...
1 parent c90769c commit b921b4c08fa57c2aa618abd1ce3b12c9a4ee8eff @sanko committed Dec 2, 2011
View
12 Changes
@@ -1,4 +1,12 @@
-Version 1.000000 | December 2nd, 2011 around noonish | xxxxxxxx
+Version 0.9.0 | December 2nd, 2011 while watching the Nightly News | xxxxxxxx
+
+ API Changes/Compatibility Information:
+ * Support for generating BEP05 (DHT Protocol) packets
+
+ Documentation/Sample Code/Test Suite:
+ * Include README
+
+Version 0.1.0| Mid-afternoon on December 2nd, 2011 | ad0b7b5a74
API Changes/Compatibility Information:
* It exists!
@@ -15,7 +23,7 @@ Version 1.000000 | December 2nd, 2011 around noonish | xxxxxxxx
Notes:
* Meanwhile...
- This distribution is my first step toward breaking Net::BitTorrent
- up into managable parts. Next comes AnyEvent::DHT or
+ up into manageable parts. Next comes AnyEvent::DHT or
AnyEvent::BitTorrent::DHT... I haven't decided on a namespace.
_ -.-. .... .- -. --. . ... _________________________________________
View
@@ -3,6 +3,7 @@ Changes
lib/Net/BitTorrent/Protocol.pm
lib/Net/BitTorrent/Protocol/BEP03.pm
lib/Net/BitTorrent/Protocol/BEP03/Bencode.pm
+lib/Net/BitTorrent/Protocol/BEP05.pm
lib/Net/BitTorrent/Protocol/BEP06.pm
lib/Net/BitTorrent/Protocol/BEP07.pm
lib/Net/BitTorrent/Protocol/BEP10.pm
View
7 TODO
@@ -1,9 +1,8 @@
-Complete but unorganized and/or undocumented...
- - ::BEP05 DHT
-
-Already in dist but require tests...
+Already in dist but require tests and/or docs...
- ::BEP07 Compact ipv6
- ::BEP23 Compact ipv4
+ - ::BEP05 DHT
+ - parsing functions in ::BEP03
Ideas...
- compact( ... ) and uncompact( ... ) to wrap both BEP23 and BEP07 functions
@@ -1,10 +1,11 @@
package Net::BitTorrent::Protocol;
use strict;
use warnings;
-our $MAJOR = 0; our $MINOR = 1; our $PATCH = 0; our $DEV = 'rc5'; our $VERSION = sprintf('%0d.%0d.%0d' . ($DEV =~ m[\S] ? '-%s' : ''), $MAJOR, $MINOR, $PATCH, $DEV);
+our $MAJOR = 0; our $MINOR = 9; our $PATCH = 0; our $DEV = 'rc5'; our $VERSION = sprintf('%0d.%0d.%0d' . ($DEV =~ m[\S] ? '-%s' : ''), $MAJOR, $MINOR, $PATCH, $DEV);
use lib '../../../lib';
use Net::BitTorrent::Protocol::BEP03 qw[:all];
use Net::BitTorrent::Protocol::BEP03::Bencode qw[:all];
+use Net::BitTorrent::Protocol::BEP05 qw[:all];
use Net::BitTorrent::Protocol::BEP06 qw[:all];
use Net::BitTorrent::Protocol::BEP07 qw[:all];
use Net::BitTorrent::Protocol::BEP10 qw[:all];
@@ -15,6 +16,7 @@ use Exporter qw[];
*import = *import = *Exporter::import;
%EXPORT_TAGS = (
build => [@{$Net::BitTorrent::Protocol::BEP03::EXPORT_TAGS{build}},
+ @{$Net::BitTorrent::Protocol::BEP05::EXPORT_TAGS{build}},
@{$Net::BitTorrent::Protocol::BEP06::EXPORT_TAGS{build}},
@{$Net::BitTorrent::Protocol::BEP10::EXPORT_TAGS{build}}
],
@@ -24,6 +26,7 @@ use Exporter qw[];
compact => [@{$Net::BitTorrent::Protocol::BEP07::EXPORT_TAGS{all}},
@{$Net::BitTorrent::Protocol::BEP23::EXPORT_TAGS{all}}
],
+ dht => [@{$Net::BitTorrent::Protocol::BEP05::EXPORT_TAGS{all}}],
parse => [@{$Net::BitTorrent::Protocol::BEP03::EXPORT_TAGS{parse}},
@{$Net::BitTorrent::Protocol::BEP06::EXPORT_TAGS{parse}},
@{$Net::BitTorrent::Protocol::BEP10::EXPORT_TAGS{parse}},
@@ -158,6 +161,7 @@ Imports everything.
Imports all packet building functions from
L<BEP03|Net::BitTorrent::Protocol::BEP03>,
+L<BEP03|Net::BitTorrent::Protocol::BEP05>,
L<BEP06|Net::BitTorrent::Protocol::BEP06>, and
L<BEP10|Net::BitTorrent::Protocol::BEP10>.
@@ -172,6 +176,10 @@ Imports the compact and inflation functions for IPv4
(L<BEP23|Net::BitTorrent::Protocol::BEP23>) and IPv6
(L<BEP07|Net::BitTorrent::Protocol::BEP07>) peer lists.
+=item C<dht>
+
+Imports all functions related to L<BEP05|Net::BitTorrent::Protocol::BEP05>.
+
=item C<parse>
Imports all packet parsing functions from
@@ -1,7 +1,7 @@
package Net::BitTorrent::Protocol::BEP03::Bencode;
use strict;
use warnings;
-our $MAJOR = 0; our $MINOR = 1; our $PATCH = 0; our $DEV = 'rc5'; our $VERSION = sprintf('%0d.%0d.%0d' . ($DEV =~ m[S] ? '-%s' : ''), $MAJOR, $MINOR, $PATCH, $DEV);
+our $MAJOR = 0; our $MINOR = 9; our $PATCH = 0; our $DEV = 'rc5'; our $VERSION = sprintf('%0d.%0d.%0d' . ($DEV =~ m[S] ? '-%s' : ''), $MAJOR, $MINOR, $PATCH, $DEV);
use vars qw[@EXPORT_OK %EXPORT_TAGS];
use Exporter qw[];
*import = *import = *Exporter::import;
Oops, something went wrong.

0 comments on commit b921b4c

Please sign in to comment.