Commit Graph

1190 Commits

Author SHA1 Message Date
fake 8b2b9816c9 add premiere mode 2020-05-13 22:26:02 -07:00
arvidn 86f04b2c09 fix handshake_timeout for peers 2020-04-24 21:24:14 +02:00
arvidn ac4dd411cc fix peer connection timeout 2020-04-18 17:06:15 +02:00
arvidn edf6660820 add build option to disable share-mode 2020-03-22 15:36:04 -07:00
arvidn be10ccd881 deprecate strict super seeding mode 2020-03-20 09:37:24 -07:00
arvidn b570f53ebf add build option to disable super seeding feature 2020-03-20 09:37:24 -07:00
arvidn 0d06d47a29 add build option to disable predictive pieces feature 2020-03-17 17:43:31 -07:00
arvidn ce9be0c83f deprecate bittyrant choking algorithm 2020-03-15 12:24:36 -07:00
arvidn acbd1c3d4c fix issue where if the last requested blocks are rejected, we may not have been requesting any new blocks 2020-02-01 11:47:17 +01:00
arvidn 592544f30f fix some PVS studio warnings 2019-11-07 16:38:08 +00:00
arvidn 7a27a0430b improve peer logging a bit more. specifically around merging requests, sending merged requests and connecting web seeds 2019-09-10 12:23:36 +02:00
arvidn 77be259938 improve peer logging 2019-09-08 19:02:09 +02:00
arvidn 07ab3b9739 add feature to create an affinity to pick adjecent pieces aligned to 4MiB extents. It's an attempt to improve disk I/O, by writing larger contiguous ranges of bytes. It's off by default. 2019-08-17 12:32:47 +02:00
arvidn bb5c612180 fix typo in validation of reject messages. Make on_choke a bit more defensive 2019-03-26 09:14:16 +01:00
arvidn b6896cf337 tighten up validation of dont-have messages 2019-03-21 16:48:08 +01:00
arvidn 972288340f tighten up validation of reject messages, to ensure consistency of stats counters 2019-03-20 18:57:41 +01:00
Arvid Norberg 28d5b7d427 remove unused flags parameter to send_buffer() and send_message() on peer_connections 2019-03-19 01:09:34 +01:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
arvidn 8fc69f5d2e don't copy a vector into the async_write operation for iovec. Since the chained_buffer will own the vector anyway, just make it return a span and copy that 2019-02-09 17:45:47 +01:00
arvidn 97e86b2969 minor fix to invalid_request_alert logging 2018-12-23 11:17:33 +01:00
arvidn 1efe05c96e remove unused variables 2018-12-05 01:25:34 +01:00
arvidn 184fa88950 fix typo in peer log 2018-12-04 19:04:10 +01:00
arvidn 792cfd1cc6 remove verbose peer logging 2018-12-02 04:03:03 +01:00
arvidn 507fffe872 move where socket buffers are set up, to happen after the socket is opened. log errors in the peer's log instead of session and torrent 2018-12-02 04:03:03 +01:00
arvidn 7a51813d32 improve peer debug logging 2018-12-02 04:03:03 +01:00
arvidn 4e2f013704 remove invalid assert 2018-11-29 10:20:27 +01:00
arvidn 3f87801142 fix some cppcheck warnings 2018-11-27 13:53:38 +01:00
arvidn ba2e0db6d5 demote is_single_thread() assertion to invariant-check, in peer_connection 2018-11-27 12:25:47 +01:00
arvidn 88c733ef2d attempt to fix an assert for a newly connected peer that disconnects just as we receive the metadata. disconnecting peers don't have their bitfield properly initialized, so we can't use it 2018-11-27 11:47:16 +01:00
arvidn 3126e8f39e improve type-safety a bit in the hole-punch code 2018-11-17 00:49:29 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn a0fa0b14bb merged RC_1_1 into master 2018-11-04 19:12:22 +01:00
Arvid Norberg 5b5b280b87 only make snubbed peers invert the piece picking strategy when we're doing rarest first (i.e. snubbed peers do common-first). Specifically, this prevents snubbed peers from picking from the end of the torrent when in sequential mode 2018-11-01 12:01:02 +01:00
arvidn 36801fb96f add some const 2018-10-20 16:30:48 +02:00
Arvid Norberg fc7b61a6f3 improve type-safety of the severity parameter to peer_connection::disconnect() 2018-09-06 16:42:04 -07:00
arvidn c9cbb122e2 fix some warnings from sonar-cube 2018-09-05 18:10:57 -07:00
arvidn 78a344bd8b merged RC_1_1 into master 2018-09-05 08:25:14 -07:00
arvidn 269b71324e improve log statement when not unchoking a peer 2018-08-27 13:43:48 +02:00
Alden Torres 28c94b54ed minor code refactor for more use of const and emplace 2018-08-20 08:06:37 +02:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
Arvid Norberg fef1b947f3 fix issue in self-connection detection introduced with the change to generate unique peer-ids for each connection. Now, the torrent keeps track of all of our peer-ids generated for outgoing (bittorrent) connections, and we check them against incoming peers' peer-ids 2018-08-19 22:19:53 +02:00
Steven Siloti 92f1937b97 fix typo in #if tests for TORRENT_DISABLE_ENCRYPTION 2018-07-29 09:04:16 +02:00
Arvid Norberg b3856d3027 narrow the scope affected by TORRENT_DISABLE_EXTENSIONS to only disable the user extensions, but always support the extension message and the built-in extensions, like lt_donthave and seed_mode 2018-07-26 09:31:49 +02:00
arvidn e92cf18340 fix some warnings around unused variables, dead stores, potentially dereferencing nullptr and calling virtual functions from constructor 2018-07-20 01:03:16 +02:00
arvidn f89c27183b remove unused function 2018-07-18 09:18:09 +02:00
arvidn e45df614fe improve type safety of internal leave_seed_mode() function 2018-07-08 17:32:50 +02:00
Alden Torres f139afc1ad minor code refactor, cleanup and typo in peer related code 2018-06-23 23:11:48 +02:00
Alden Torres 03971be80b some refactor, more use of auto and const in peer_connection.cpp (#3105) 2018-06-16 17:22:04 +02:00
Arvid Norberg b26467c04e deprecate network-threads setting 2018-06-10 19:34:07 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00