* refactor: update bep links
* chore: use more appropriate data types
* chore: checkpoint
* refactor: split `can_request()` into each of their own different signature
* chore: checkpoint
* refactor: convert tr_peerMsgsImpl functions to methods
* chore: checkpoint
* refactor: store peer info as reference
* refactor: convert all member variables to private
* chore: re-arrange methods
* refactor: optimise tmp vector default size in `send_ut_pex()`
* chore: housekeeping
* chore: housekeeping
* refactor: avoid `dynamic_cast` when sending cancel
* fix: restore `blocks_sent_to_peer` stat
regression e91af26923
* fix: choke first then reject
* refactor: convert `tr_peerMsgsNew()` to static factory function
* refactor: store `tr_torrent` reference instead of pointer
* Revert "refactor: store peer info as reference"
This reverts commit bb419bf2
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: encapsulate request tracking in a class
Introduces a new class to peer-mgr, `ClientRequests`, which tracks what
active requests we've got pending: which blocks, when the requests were
sent, and who they were sent to.
This shouldn't change peer-mgr behavior. Its goal is to carve out some
of peer-mgr's data structures and encapsulte them behind an API that's
simpler to understand.
* refactor: move ActiveRequests to its own file
* perf: avoid duplicate call to tr_cpMissingBlocksInPiece