Commits on Feb 13, 2009
  1. Minor pre-tag changes

            * update all version numbers to 0.050
            * now requires perl 5.8.8 or better because I'm tired of wasting time
                making sure N::B works with ancient versions
    committed Feb 13, 2009
Commits on Feb 12, 2009
  1. Code freeze. Like... for real this time.

        * New public accessors for Net::BitTorrent::Peer: am_choking,
          am_interested, bitfield, host, incoming, peer_choking, peer_interested,
          port, reserved_bytes, source, torrent. See the docs.
    committed Feb 12, 2009
  2. More prep for v0.050 stable

        * Update copyright notices for current year in all recently modified files
        * Retry outgoing connection with plain text when MSE handshake fails
        * Fix: Math::BigInt try => [...] requires v1.78+ (see failures in
            cpants://3252890 and cpants://3253722)
        * Net::BitTorrent->_schedule() now accepts fractional seconds. Just in
            case the user has used Time::HiRes...
        * Fixed skip() calls in all tests
        * New auto_feature for Math::Pari and Math::BigInt::Pari
        * M::Pari and M::BigInt::Pari are now in the list of recommended modules
    committed Feb 12, 2009
Commits on Feb 11, 2009
  1. Random changes running up to v0.050 stable

        * Message Stream Encryption is enabled by default (plaintext out, RC4 in)
        * Update (some) Copyright notices where appropriate
        * Documentation updates in N::B::Notes
        * Made unknown packet reporting a lot less stupid (creates a block users
            can c+p right into the issue tracker)
        * New demo: /tatoeba/
        * Remove call for assistance from's POD (message remains in
    committed Feb 11, 2009
Commits on Feb 9, 2009
  1. Prepping a devel CPAN dist

    committed Feb 9, 2009
Commits on Feb 8, 2009
  1. Belay that

        * Previous commit was made by... someone with an extra chromosome... Yeah.
        * Undo some of the silly stuff I left in (I don't want to merge commits)
    committed Feb 8, 2009
  2. More encryption stuff and step one of the N::B::Peer Internal Structu…

    …re Shuffle
        * Recommended perl version is 5.10.0. Now that it's been out more than a
            year, I see no reason to continue going out of my way to support
            ancient perl versions. Even most modern Linux distributions come with
            5.10.0 now. ...and I dev on bleadperl.
        * N::B::Peer->_rw() progress has changed from...
            - write
            - read
                + process_packets (if read)
            - read
            - write
            - process_packets (on a timer)
        * t/[...]/007_miniswarm_http.t now uses encryption. ...for now.
        * Full RC4 encrypted sessions (kinda) work. It's (very) unstable.
    committed Feb 8, 2009
Commits on Feb 5, 2009
  1. Encrypted Protocol headers are complete and various unrelated tweaks

        * Internal status is kept during handshake
        * Shorter waiting period before filling requests (15s -> 3s)
        * Build.PL requires Math::BigInt on all systems
        * Default for number of allowed connections per host has changed (2 -> 1)
    committed Feb 5, 2009
Commits on Feb 4, 2009
  1. Major bugfix and protocol encryption

        * Protocol encryption is now supported in both plaintext and RC4 modes
        * Fix for HAVE reporting bug
    committed Feb 4, 2009
  2. Last pre-encryption commit

        * Define bitfield (scalar ref) in N::B::Peer->new() to silence the "Can't
            use an undefined value" warning if N::B::Peer->_bitfield() is called
            before we recieve a handshake (in peer_connect callback, for example)
        * N::B::Peer objects have their sockets closed and removed before calling
            peer_disconnect callback
        * Early protocol encryption stuff in lib/Net/BitTorrent/
        * New private Net::BitTorrent::Torrent->_add_node('XXX.XXX.XXX.XXX:XXX') method
    committed Feb 4, 2009
Commits on Jan 28, 2009
  1. Previous commit continued and one test bug 'fixed'

        * Removed test #40 ("...rmdir temp dir to test _mkpath") from
            t/700_classes/Net/BitTorrent/Torrent/File.t. It was testing a
            File::Temp trick which certainly fails on non-Win32 platforms
        * I forgot /tatoeba/ in the previous commit
    committed Jan 28, 2009
Commits on Jan 27, 2009
  1. Minor documentation fixes

        * Proofreading N::B::Notes
        * Brief message in example scripts about viewing the source
    committed Jan 27, 2009
  2. More protocol test fixes and cleanup

        * Improved test names in t/[...]/Protocol.t
        * More edge case tests in t/[...]/Protocol.t
    committed Jan 27, 2009
  3. 32-bit math fixes in the test suite

        * More pod cleanup
            - Fix bad internal link in N::B::Version
        * fix t/[...]/Protocol.t failures due to the limits of 32-bit math
        * tatoeba/*.pl shorten =head1 NAME content so it doesn't wrap on
    committed Jan 27, 2009
  4. Move into github and code clean up

      * Several updates in the language used in N::B::Version's pod
      * N::B::Notes has been trimmed down a bit
      * N::B's pod has been trimmed
      * ALL tests are run even on non-dev systems
        - I'm doing this to shake out the last few (I hope) crash/protocol bugs
          before really putting effort into more advanced stuff
    committed Jan 27, 2009
Commits on Jan 5, 2009
  1. Resume system v2, half-open timeouts, peers remember source

     * [fix] N::B::Peer->as_string(1) now gives correct choke/interest statuses
     * [etc] Improved description for N::B::Peer disconnect when sent
             unrequested piece.
     * [new] Several new private methods:
               - N::B->_set_half_open()
               - N::B->_set_peers_per_torrent()
               - N::B->_set_connections_per_host()
     * [fix] N::B->_set_max_ul_rate() requires a value greater than 0 (zero)
     * [etc] Various tests tie STDERR to make sure as_string() is handled
     * [api] Major: Lists of potential peers and complete/incomplete counts (if
             applicaable) are kept by their source (Net::BitTorrent::DHT,
             Net::BitTorrent::Torrent::Tracker::UDP) rather than in the related
             Net::BitTorrent::Torrent object. Net::BitTorrent::Torrent keeps
             only a few nodes in an internal cache to speed things along.
             Eventually, Net::BitTorrent::Peer objects will contain info about
             how we found them. This was a Short Term Goal.
     * [etc] /tatoeba/ only works until the torrent is completed
     * [etc] shorter timeouts for miniswarm tests
     * [api] Major: Resume system (yeah, the thing I added a little over a week
             ago) is deprecated and has been replaced.  I thought about it and
             changing the original .torrent's metadata is a bad idea so I
             switched from Rakshasa- to Rasterbar-like.  The internal structure
             is still subject to change and the docs probably don't match.
    committed Jan 5, 2009
Commits on Jan 2, 2009
  1. New demos, schedule fixes, half open peer timeouts, quicker HTTP trac…

    …ker retries
     * [fix] /tatoeba/ was using builtin sleep which (of course) does not support fractional periods
     * [fix] Various N::B::Torrent status and internal schedule fixes.
     * [fix] N::B::Torrent->hashcheck() no longer stops the torrent first
     * [fix] Expanded limits on what a N::B::Torrent object can do while being hashchecked or stopped or standalone.
     * [etc] When we're a seed, we don't attempt new connections as often.
     * [etc] N::B::T::Tracker::HTTP retry is now 30s on socket error (formerly 5m)
     * [new] N::B::Peer objects are disconnected if they don't complete handshake within 30s.   We used to wait for the OS to tell us the socket was disconnected (perhaps 1-2m).
     * [etc] Private N::B::Torrent->_status_as_string() for 'nice' status strings
     * [api] Net::BitTorrent::Torrent->peers() is now public
     * [new] /tatoeba/ - Trivial, Multi-threaded Example
     * [new] /tatoeba/ - Demonstration of Net::BitTorrent::Torrent's Resume System
     * [fix] Build.PL exit(0) when perl < v5.8.1 or M::B < v0.3
    committed Jan 2, 2009
Commits on Dec 31, 2008
  1. New debugging example and testing usefulness of half_open limit

     - [etc] new debugging script: /tatoeba/
     - [etc] Don't constrain outgoing connection attempts with half_open limit (temporary change for testing)
     - [etc] Net::BitTorrent::Peer->as_string(1) tweaks (with much more to do)
     - [fix] Correct MailingList metadata generated by Build.PL
    committed Dec 31, 2008
Commits on Dec 30, 2008
  1. Major API-related bug fix and first few example scripts

     - [doc] Removed reference to N::B::DHT::Node from N::B::Notes
     - [doc] Various documentation changes in N::B::Notes
     - [etc] tries to require Module::Build 0.3
     - [api] Separated 'Path' arg tests in Net::BitTorrent::Torrent to provide more appropriate error messages
     - [fix] r45 N::B::Torrent->new failed to set set defaults, generate a peerid, or create a DHT object when called without arguments.
     - [api] N::B::T::Tracker->urls() is now public
     - [api] N::B::T::HTTP->url() and N::B::T::UDP->url() are now public
     - [etc] tracker-related tests updated to new url() and urls() public status
    committed Dec 30, 2008
Commits on Dec 26, 2008
  1. Stable resume system and more socket fixes

     - Close all sockets on client destruction just in case (left a few FIN_WAIT1 connections on Win32)
     - The announce and discussion lists have been combined into a single list found at
     - N::B::Torrent->raw_data( [ RAW ] ) and N::B::Torrent->resume_data( [ RAW ] ) return bencoded or raw metadata based on bool parameter
     - N::B::T::T::UDP and N::B::T::T::HTTP have been updated to match N::B::T->raw_data( [ RAW ] ) change
     - N::B::T->hashcheck() clears the bitfield before starting
     - N::B::T::T::UDP and N::B::T::T::HTTP default to 0 when tcp_port is undef (happens when we fail to open port)
     - 'Progress' value in N::B::Torrent->as_string(1) only considers pieces we want
     - Documentation tweaks throughout
     - Resume system has been gutted and rewritten to be per-torrent only.
     - Suggestions for Client-wide resume is in Net::BitTorrent::Notes
     - s=c\Kie=ei=g;
     - scripts/ skips hashcheck when resume data loads okay
    committed Dec 26, 2008
Commits on Dec 18, 2008
  1. Resume system and DHT fixes

     - [etc] scripts/ was reading nodes from the wrong file
     - [fix] N::BitTorrent is taint 'safe' again
     - [fix] Separated TCP and UDP socket creation in lib/Net/
     - [fix] Reporting wrong port number in DHT announce (udp rather than tcp...)
     - [fix] Skip related tests on broken systems in t/700_classes/Net/BitTorrent.t
     - [API] N::B->_use_dht() now takes into account whether or not we have an open udp port
     - [API] Pre-alpha resume system for N::BitTorrent, N::B::DHT, and N::B::Torrent
     - [fix] N::B::DHT no longer sees boot nodes and 'regular' nodes differently
     - [etc] N::B::DHT attempts to contact all newly added nodes rather than throwing them in a bin (which we never got around to using...)
     - [fix] N::B::DHT deletes nodes we haven't seen in 15m
     - [fix] N::B::DHT deletes nodes with more than 10 errors (ignored/lost packets)
     - [fix] N::B::DHT resets fail count to zero when a node sends us a packet
     - [fix] N::B::DHT keeps a runny tally of how many good packets a node has sent
     - [fix] N::B::DHT pings every node every 8m
     - [fix] N::B::DHT heartbeat moved from 25s to 45s
     - [fix] N::B::DHT no longer dies when we get a bad packet
     - [API] Seeing as N::B::Torrent keeps nodes compact anyway, N::B::T->_compact_nodes() has been renamed N::B::T->_nodes() and N::B::T->_append_compact_nodes() is now N::B::T->_append_nodes().  Various modules have been updated in compliance.
     - [etc] The variables behind most private functions have been renamed to reflect their nature
     - [etc] scripts/ can use the resume/restore functions (in their current state)
     - [doc] Light docs for resume stuff in N::B::Notes
    committed Dec 18, 2008
Commits on Dec 11, 2008
  1. Mainline DHT is finally functional but still un(der)tested

     - [doc] link rfc://3986 to X<> in See Also; CPAN was confused by it.
     - [etc] Makefile.PL exits with 0 on < v5.8
     - [API] Net::BitTorrent::DHT::Node is gone.
     - [etc] t/700_classes/Net/BitTorrent/DHT/Node.t is gone
     - [doc] Temporary change to ip_filter callback documentation (DHT boot stuff)
     - [etc] ip_filter tests in t/700_classes/Net/BitTorrent/Peer.t are temporarily TODO tests (DHT boot stuff)
     - [API] Advanced output from N::B::->as_string() now includes local DHT NodeID
     - [API] N::B::DHT->_add_node() now expects a hashref with separate ip' and 'port' keys
     - [int] N::B::Peer->__handle_ext_protocol() changed to reflect change in expected params to N::B::DHT->_add_node();
     - [API] N::B::Protocol now exports a :dht tag. You get both the query and reply packet builders. Note: they are, at this time, undocumented and are certainly subject to change. In the future, these will be rolled into the :build tag. Probably.
     - [new] N::B::Torrent schedules future DHT _scrape and _announce processes
     - [fix] N::B::Version::gen_node_id() was just plain wrong
     - [etc] More messing around with scripts/ (unstable/stupid stuff that will probably be rolled back before CPAN)
     - [etc] More in-the-middle DHT nodes to climb through in t/000_miniswarm/008_miniswarm_dht.t
    committed Dec 11, 2008
Commits on Dec 5, 2008
  1. Tidying up and CPAN

     - [etc] Silence some silly debug msgs
     - [etc] scripts/ POD changes
     - [API] as_string() is now public in all classes. Tests and docs changed to match
     - [doc] Synopsis in README now matches that of N::B proper
     - [etc] CPAN v0.042
    committed Dec 5, 2008
Commits on Dec 2, 2008
  1. PAUSE is retarded, I'm just slow

     - [etc] Create tarballs with "proper" UNIX permissions
     - [fix] Old _del_socket() was being called when we fail to write a piece to disk
     - [etc] scripts/ now reports file errors (only after initial hashcheck)
     - [fix] Retry 1..3 times to write a piece to disk on error (makeshift)
    committed Dec 2, 2008
  2. CPAN-ready cleanup

     - [etc] Inclusion of modified passthrough Makefile.PL for slackers
     - [etc] Made t/.../Peer.t a release test
     - [ver] Version bump to stable r40 for CPAN distribution
     - [doc] Widespread cleanup
     - [Fix] Some peers (I've yet to determine which client) request 0-length blocks which caused a warning in N::B.  I ignore these now.
     - [etc] General rules for slow pieces have changed. Timeout up from 1=>3m. Pieces start out 'slow'
     - [etc] CANCEL and REJECT messages are shown in scripts/
     - [Fix] Sticky HTTP tracker 'event' status (makeshift)
     - [Fix] incoming_packet/BITFIELD callback gets payload (...I still think it's too heavy)
     - [Fix] N::B::Peer - payload checks in various places
     - [etc] Cancel request timeout changed from 30=>60s.
     - [Fix] Removed useless %pieces from N::B::Torrent
     - [Fix] N::B::T::_wanted() and N::B::T::_weights() now work while status & CHECKING
     - [New] Piece selection has changed! When the number of slow pieces hits a limit (currently static at 5) we pretend to be in endgame mode and work only on those pieces. The other changes are experimental and undocumented.
     - [etc] N::B::T::_as_string() has been fleshed out a bit.
     - [etc] Retry for failed HTTP trackers has changed 30s=>5m
     - [ver] Various modules have been marked unstable for this release
     - [etc] scripts/ was tweaked a lot. new --options parameter, combined --help and --man, INT signal kill changed 10s=>1s
     - [doc] now represents the current spec
     - [etc] ...I'm sure I'm forgetting somethimg.
    committed Dec 2, 2008
Commits on Nov 26, 2008
  1. Code cleanup and per-torrent callbacks

     - [Fix] N::B->do_one_loop() returns 1 on success and undef on failure rather
               than the timeleft value from select (which may, at times, be zero)
     - [Fix] Returned hard limit to number of working pieces (24) as letting it go
               spreads us too thin (and needlessly fills memory)
     - [New] Per-torrent callbacks
     - [New] Net::BitTorrent::Torrent->piece_count() is now public
     - [New] Max half open is now a variable (8; static for now)
     - [etc] Reworked Peer.t to bring coverage up sometime in the future
     - [Fix] Slow pieces are no longer left hanging indefinably.
     - [Fix] ...when did I disable piece selection based on priority?
     - [etc] Documentation cleanup
     - [etc] Idle timeout for peers is now 4m (formerly 2m)
     - [New] Net::BitTorrent::Torrent exports :status tag
     - [Fix] UDP trackers automatically retry according to spec
    committed Nov 26, 2008
Commits on Nov 23, 2008
Commits on Nov 22, 2008
  1. Fast Peers and dead socket fixes

     - [Fix] Sending BITFIELD vs heaps of HAVE packets
     - [Fix] Generate BITFIELD (or alt packet) *after* handshake is complete
     - [New] Use HAVE_ALL and HAVE_NONE outgoing packets when appropriate
     - [New] Store RESERVED bytes from remote peers
     - [API] Combined all packet callbacks in order to clear clutter
     - [etc] Tweaked slots/peer ratio to boost speed
     - [etc] Give the miniswarm tests a little more time (15s)
     - [Fix] Limit number of peers per torrent (50)
     - [Fix] Limit number of unchoked peers per torrent (8)
     - [Fix] Limit number of half-open peers per client (4)
     - [Fix] Limit number of connections per remote peer (3, 1 in stable)
     - [Fix] Disconnect seeds when we are complete
     - [Fix] False tracker failures on read
     - [etc] Removed max working limit (for testing)
     - [etc] Reworked miniswarm tests to prevent stalls on slow systems
     - [etc] Stable enough to move to trunk
    committed Nov 22, 2008
Commits on Nov 20, 2008
  1. UDP FTB!

     - ReuseAddr and ReusePort were both dangerous and stupid
     - Moved all UDP socket stuff to N::B to simplify use of DHT and UDP
         trackers. (TCP stuff may get a similar rewrite after the next stable
         (CPAN) release)
     - First (of many) steps to getting UDP trackers working (3hrs hack; !perfect)
      + new test 009_miniswarm_udp.t
     - Pulled default bandwidth stuff back to 2**15
      + 2**20 gobbles memory .:shrugs:. I'm doing something wrong, I'm sure
     - Spell checked (most) POD documentation ("recieved"? ouch...)
     - remove Build.PL's perl 5.8 requirement (just 'cause)
     - All log related stuff (the callback, the :log tag in N::B::Util) related
       stuff is gone
      + (I only had three log callbacks in the entire dist...)
     - scripts/ really is a very basic example now
     - Mental note about issue #3
     - Fast Extension is back (mostly)
    committed Nov 20, 2008
Commits on Nov 10, 2008
  1. Fix for mishandled multi-tiered trackers and test tweaks

     - torrents used by t/.../Torrent.t is now totally dynamic
      + loops through all .torrent files in /t/900_data/950_torrents/
     - more of the fine grain tests are run during 'regular' build test phase
     - N::B::T::Tracker was mangling multi-tracker tiers
     - build tidy checks one file at a time
     - Okay, NOW, *::_as_string() works as intended.
    committed Nov 10, 2008
Commits on Nov 9, 2008
  1. Loads of stuff

     - Internal status to prevent (possibly) damaging actions from taking place
      + For example, hash checking the same torrent twice in two threads
          or trying to write to a torrent being checked or requesting pieces
          for a paused torrent.
     - pause(), start(), stop(), and queue() for individual torrents [untested]
     - *::_as_string() works as it should
     - Default bandwidth limits are now 2**20 (virtually unlimited)
     - Moved from Data::Dumper to optional Data::Dump prerequisite
     - Net::BitTorrent::Torrent's API and docs are less sketchy
     - Net::BitTorrent::Torrent->_peers() returns list
     - New Build actions for dev:
      + profile (for future use)
      + tidy
     - N::B::P::_rw()'s dispatch subs are no longer inline
    committed Nov 9, 2008
Commits on Nov 1, 2008
  1. Layout changes

     + Build.PL
       - Win32 recommended modules moved to new win32_utf8_support auto_feature (untested)
     + Renamed Net::BitTorrent::Session* to Net::BitTorrent::Torrent* after having received a number of "Where's the torrent class/object?!?" emails. I really dislike making such sweeping API changes but this does make sense. ...from a user's point of view.
     + now reflects changes in PeerID format. (Separate Wiki changes push up the repo's revision number. Gah, Google, how stupid...)
    committed Nov 1, 2008
Commits on Oct 29, 2008
  1. - First attempt at being thread safe.

    - Taint 'safe' again
    - v027_007
    committed Oct 29, 2008
Commits on Oct 11, 2008
  1. ...I really should keep better track of what I'm doing with this bran…

     - New to hold all sorts of version and identification stuff
     - Many tests skipped based on user categories and system capabilities thanks Module::Build trickery
     - use Scalar::Util::refaddr in all classes (...I'm toying with the object system for kicks)
     - tests if UDP loopback will cause test failures
     - .:shrugs:. More?
    committed Oct 11, 2008
Commits on Sep 26, 2008
  1. Loads more stuff.

     - Test suite is a little less stupid
     - DHT is disabled by default
     - /LICENSE, /README /CHANGES /TODO.pod, etc.
     - License info has been changed to reflect project's move to Artistic 2.
     - Stable enough for trunk but documentation is lacking
    committed Sep 26, 2008