NAME

Net::BitTorrent::Protocol::BEP11 - Peer Exchange (PEX) Implementation

DESCRIPTION

This module implements the Peer Exchange extension (BEP 11), allowing peers to exchange lists of known peers in a swarm. It supports both IPv4 and IPv6.

METHODS

send_pex($added, $dropped, $added6, $dropped6)

Sends a PEX message. Each argument is an array reference of peer hashes ({ ip => ..., port => ... }).

on_pex($added, $dropped, $added6, $dropped6)

Callback triggered when a PEX message is received.