NAME
Net::BitTorrent::Protocol::BEP06 - Fast Extension
SYNOPSIS
# Inherits from Net::BitTorrent::Protocol::BEP55 (Holepunching)
use Net::BitTorrent::Protocol::BEP06;
# Inform peer we have everything immediately
$proto->send_have_all( );
# Explicitly reject a request (instead of ignoring it)
$proto->send_reject( $index, $begin, $length );
DESCRIPTION
Net::BitTorrent::Protocol::BEP06 implements the Fast Extension (BEP 06). This extension improves swarm efficiency by adding several messages that reduce latency during startup and provide better error handling for block requests.
METHODS
send_have_all( ) / send_have_none( )
Compact alternatives to the BITFIELD message. HAVE_ALL signals that the client is a seeder, and HAVE_NONE signals a leecher with no data.
send_suggest( $index )
Sends a hint to the peer that they might want to request a specific piece. Useful for Super-seeding or distributed cache optimization.
send_allowed_fast( $index )
Informs the peer that they are allowed to request the block at $index even if they are currently choked. This is used to allow "free" initial data during startup.
send_reject( $index, $begin, $length )
Explicitly rejects a block request. In legacy BitTorrent, ignored requests simply timed out; the Fast Extension allows clients to immediately retry other peers.
Callbacks
on_have_all( ) / on_have_none( ) / on_suggest( $index ) / on_reject( ... ) / on_allowed_fast( $index )
Overridable event handlers triggered when the remote peer sends the corresponding message.
Specifications
BEP 06: Fast Extension
AUTHOR
Sanko Robinson <sanko@cpan.org>
COPYRIGHT
Copyright (C) 2008-2026 by Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.