Commit Graph

437 Commits

Author SHA1 Message Date
arvidn 645b121df6 deprecate resolve-countries 2015-12-14 21:32:30 -05:00
arvidn cc3b064cff fix graceful pause issue. peers regularly check whether they should disconnect or not 2015-12-04 23:27:43 -05:00
arvidn 98c3b75b55 use more efficient (in-place) handler allocation for udp async_read and session second_tick 2015-11-28 00:57:44 -05:00
arvidn fba0762353 fix some msvc warnings 2015-11-19 19:01:54 -05:00
arvidn 17c5759829 disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings 2015-09-06 22:55:41 -04:00
arvidn a344c659e5 Revert "use handler allocator for UDP socket read handler"
This reverts commit 3ccb4f7dca.
2015-09-03 07:29:24 -04:00
arvidn 3ccb4f7dca use handler allocator for UDP socket read handler 2015-09-02 01:15:02 -04:00
arvidn a0c9fafd39 factor out handler_storage and allocating handler helper classes for allocating asio handlers in-place in peer objects 2015-08-31 00:17:42 -04:00
arvidn e0c3d28321 fix some warnings 2015-08-02 15:55:05 -04:00
arvidn 6c5aec3476 fix request queue size performance issue 2015-07-20 08:20:17 -07:00
arvidn 9231476ac6 employ variadic templates and perfect forwarding for peer connection asio handler allocator 2015-07-20 06:44:58 -07:00
Steven Siloti 9bf1d6c5e9 peer_connection_handle 2015-07-12 14:40:03 -07:00
arvidn 323af56cc2 update interest when changing upload-only mode 2015-06-16 01:24:35 -04:00
arvidn 41533205be drop support for boost 1.35 and fix some more references to the asio namespace 2015-06-06 02:10:53 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 1357fd5265 clean up usage of printf attribute (encapsulate it in a macro) 2015-05-10 05:11:51 +00:00
Arvid Norberg 4f216dece3 factor out strings of peer logs to be enums instead, in peer_log_alert 2015-05-03 02:53:54 +00:00
Arvid Norberg 42120014d0 merged changes from RC_1_0 2015-04-28 04:01:40 +00:00
Arvid Norberg 2fff222235 silence some warnings on msvc 2015-04-27 02:21:12 +00:00
Arvid Norberg 2fb1a0f3c7 fix msvc build issue 2015-04-26 01:25:45 +00:00
Arvid Norberg 91e66f65d3 removed unused argument (and silence warning) 2015-04-23 06:12:53 +00:00
Arvid Norberg 3664c7c137 fix more warnings and bare_bones build 2015-04-22 00:59:35 +00:00
Arvid Norberg 0b063de9ff fix more warnings 2015-04-21 04:30:34 +00:00
Arvid Norberg 3951377d95 fix include paths for warning push and pop headers 2015-04-21 01:16:28 +00:00
Arvid Norberg f5629eb403 cleanup and fixing of more warnings 2015-04-21 00:23:00 +00:00
Arvid Norberg bf32895de9 fix asserts=off build 2015-04-19 13:18:54 +00:00
Arvid Norberg 21751347bc more warnings fixes and cleanup 2015-04-19 06:28:21 +00:00
Arvid Norberg 51e86ca2d5 more warning fixes and cleanup 2015-04-18 22:00:27 +00:00
Arvid Norberg 408232cfc8 raise warning level. fix a few of them. filter out warnings from boost 2015-04-18 02:33:39 +00:00
Arvid Norberg 1faf2e201f inversed TORRENT_LOGGING build config to enable logging by default. It's now disabled by TORRENT_DISABLE_LOGGING 2015-04-17 01:15:33 +00:00
Arvid Norberg c1dc982f4f deprecate the ptime type and related time types. just use boost::chrono / std::chrono 2015-03-12 04:34:54 +00:00
Arvid Norberg 91270a0c2b make operation_t public and document it. include peer disconnects in client_test log 2015-02-15 05:17:09 +00:00
Arvid Norberg 9fb98b1151 remove speed affinity feature in piece-picker and peers 2015-02-08 21:17:00 +00:00
Arvid Norberg d8d069675c improve piece picker to better support torrents with very large pieces and web seeds 2015-01-20 02:34:55 +00:00
Arvid Norberg 0f37e3403c transition from intrusive_ptr to shared_ptr. don't export initialize_default_settings 2015-01-06 08:08:49 +00:00
Arvid Norberg 20b9a01a09 pack members of pending_buffer a bit 2014-12-10 01:05:40 +00:00
Arvid Norberg 09bc1550e9 simplify the debug logging mechanism. There's now only one build option, logging=on or logging=off. When logging is enabled, the log level is controlled by the alert mask. All log events are delivered as alerts and it's up to the client to write them to disk in whatever way seems appropriate. removed the pointless logger plugin 2014-12-09 09:08:26 +00:00
Arvid Norberg 4eaec6d87f instead of using a fixed request timeout for every peer, have an adaptable one based on the average download time for a block 2014-12-08 17:06:04 +00:00
Arvid Norberg c4e5df8e4d remove the concept of timeout_extend in piece request timeouts. if a request times out, cancel it as soon as it holds up the completion of a piece 2014-12-07 22:22:38 +00:00
Arvid Norberg 1ed1963f29 remove size_type typedef in favor of boost::int64_t 2014-12-03 04:32:50 +00:00
Arvid Norberg 658e2ceefd merged Steven Siloti's peer crypto patch into trunk 2014-11-23 06:14:47 +00:00
Arvid Norberg e09a2b770d factored out choke comparison functions into choker.cpp 2014-10-22 22:30:04 +00:00
Arvid Norberg ceccc2a483 land branch to remove half-open connection limit / connection queue 2014-10-03 20:56:57 +00:00
Arvid Norberg 6a4a5419c2 one more fix 2014-09-28 04:05:44 +00:00
Arvid Norberg 7a55069ec9 add additional single-thread asserts and separate torrents from the session (in preparation for running them in separate threads/strands) 2014-09-22 17:41:06 +00:00
Arvid Norberg d7d498c3a3 more steps towards isolating peer_connections from the session object. unchoking now happens via the torrent object. hopefully in the future, the session can determine which peers to unchoke without having direct access to them (i.e. with a mutex) 2014-09-22 03:47:43 +00:00
Arvid Norberg 27b7705cf2 remove built-in GeoIP support 2014-09-21 21:01:48 +00:00
Arvid Norberg c7a0bde196 fix bug in peer_connection::second_tick 2014-09-20 23:57:59 +00:00
Arvid Norberg 7d751b80da merged fixes from RC_1_0 2014-08-26 03:14:32 +00:00
Arvid Norberg ab8c1eb334 log latency of bittorrent requests 2014-07-28 22:18:06 +00:00
Arvid Norberg 2f6a68bad3 track RTT of piece requests 2014-07-28 07:52:59 +00:00
Arvid Norberg 30713a4a79 remove buffer stats debugging feature 2014-07-19 08:20:20 +00:00
Arvid Norberg 65bb1d0006 pass all the arguments to peer connections as an argument pack 2014-07-14 04:32:41 +00:00
Arvid Norberg 01640e1682 separate stats counters from session_interface (this was the main use of m_ses in peer connections) 2014-07-13 04:56:53 +00:00
Arvid Norberg bf18e310e6 remove some peer connection dependencies on m_ses 2014-07-12 22:32:55 +00:00
Arvid Norberg a6f345181f fixed some unused argument warnings 2014-07-07 06:28:48 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg 474e77039f removed set_ratio feature 2014-05-03 17:11:55 +00:00
Arvid Norberg 3192e59a1a improve piece_deadline/streaming 2014-04-22 04:21:14 +00:00
Arvid Norberg 0b3df1c973 merged integer overflow fix from RC_0_16 2014-04-16 08:25:14 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg 8ab1d8b686 more build fixes and cleaning up 2014-01-19 20:19:15 +00:00
Arvid Norberg 702b68ecc4 clean up assert related defines and debuf-only fields less error-prone. fix missing initialization in file_pool caused by mistake in defines under which the debug field was initialized 2014-01-19 19:45:50 +00:00
Arvid Norberg 4e6b1cfbfb update copyright 2013-12-25 17:07:16 +00:00
Arvid Norberg faa53d7657 member re-order and struct packing 2013-12-02 04:24:10 +00:00
Arvid Norberg fc2fc8dfb2 fix initialization order warnings. pack peer_connection and torrent 2013-11-26 07:47:48 +00:00
Arvid Norberg e122678d04 pack fields in internal_file_entry, torrent_status and chained_buffer 2013-11-26 04:39:33 +00:00
Arvid Norberg dafa812109 merged fixes from RC_0_16 2013-11-08 07:23:36 +00:00
Arvid Norberg 90e7a4c9e3 merged some rate limiter polish from libtorrent_aio 2013-11-02 03:26:53 +00:00
Arvid Norberg 6a1e861a1d introduce mechanism for plugins to prevent libtorrent to disconnect peers for time-out reasons 2013-08-09 07:55:12 +00:00
Arvid Norberg 1cb0161f0e merge fix from RC_0_16 2013-07-26 16:59:10 +00:00
Arvid Norberg b03300201b fix release build 2013-06-29 05:53:17 +00:00
Arvid Norberg 93993002ab merged unchoke algorithm fix from RC_0_16 2013-06-01 22:33:11 +00:00
Arvid Norberg 520b8bfcd1 move out alert_manager to its own compilation unit. remove TORRENT_DISABLE_EXTENSIONS from affecting the public API 2013-04-09 02:38:11 +00:00
Arvid Norberg 22b1c968a4 back-ported choking issue at high uplod rates 2013-03-26 04:45:38 +00:00
Arvid Norberg a0caa0f4b2 disable invariant_check functions when invariant checks are disabled 2013-02-25 04:13:46 +00:00
Arvid Norberg ac5a9e9882 introduce global connection priority for improved swarm performance 2012-12-31 06:54:54 +00:00
Arvid Norberg bff648a89e update copyright dates and add tool to do so 2012-10-02 03:16:33 +00:00
Arvid Norberg c56901e864 improve web seed hash failure mode 2012-09-29 17:46:41 +00:00
Arvid Norberg d6a53200a2 add a force-flag to cancel_request 2012-06-06 16:05:25 +00:00
Arvid Norberg 5275e75fa5 back-port deletion of the redundant peer_connection constructor from libtorrent_aio 2012-05-14 05:43:45 +00:00
Arvid Norberg 49f74be42f make super-seeding a bit more robust 2012-04-23 05:48:46 +00:00
Arvid Norberg cafbf2ca1d more work on minimizing shared object export symbol table 2012-03-20 03:53:07 +00:00
Arvid Norberg 8f3c3de1e2 add incoming requests to stats logging 2012-03-05 10:05:20 +00:00
Arvid Norberg f7b5c10b2b add asserts to try to catch crash in peer_connection::received_valid_data 2012-02-09 06:24:58 +00:00
Arvid Norberg 94a1cae4a3 don't disconnect peers that don't have metadata 2012-02-07 09:18:07 +00:00
Arvid Norberg a6b5f761e8 rename is_local to is_outgoing and m_active to m_outgoing 2012-02-07 03:46:21 +00:00
Arvid Norberg 4706807300 fix issue with outgoing connections not being tied to a torrent 2012-01-21 21:29:22 +00:00
Arvid Norberg 7f90a241b6 don't let hung outgoing connection attempts block incoming connections 2012-01-21 09:05:34 +00:00
Arvid Norberg 61e8d3dd49 improved peer exchange performance by sharing incoming connections which advertize listen port 2012-01-04 20:49:54 +00:00
Arvid Norberg 8e8f798905 get rid of read-recurse hack 2011-11-30 20:07:18 +00:00
Arvid Norberg 614b279acb fix assert 2011-11-27 05:46:52 +00:00
Arvid Norberg f979f7a77b make receive_buffer() not return a range exceeding the actual buffer 2011-11-27 01:08:28 +00:00
Arvid Norberg 9afd09d797 optimize sending buffers on peer sockets by corking and uncorking 2011-10-24 04:22:53 +00:00
Arvid Norberg d3fb55e1da optimize socket send buffers a bit 2011-10-19 02:40:37 +00:00
Arvid Norberg 85db40e2c5 log outstanding reading bytes from peers in stats log 2011-09-23 20:57:42 +00:00
Arvid Norberg 469414d486 initial BitTorrent over SSL support 2011-09-12 03:51:49 +00:00
Arvid Norberg 92bcb9ebfd feature to encrypt peer connections with a secret AES-256 key stored in .torrent file 2011-09-05 05:50:41 +00:00
Arvid Norberg d4958c9286 support for dont-have extension message 2011-08-07 00:41:13 +00:00
Arvid Norberg 88fa0b9393 optimize send buffer allocation and deallocation by not allowing requiring contiguous buffers 2011-05-19 02:41:28 +00:00
Arvid Norberg a73960aa5a support release asserts 2011-05-08 09:04:59 +00:00
Arvid Norberg 573a291495 first step to remove recursion in bandwidth channel 2011-04-21 03:13:53 +00:00
Arvid Norberg 5456f2ac91 provide more stats with stats builds 2011-02-03 04:09:50 +00:00
Arvid Norberg b230c385d9 clean up logic around waiting for disk write queue to fall below low watermark. optimize peer disconnect. Fix integer overflow bug in uTP/TCP mixed mode algorithm. Fixed some invariant checks for closing connections issues 2011-01-25 08:03:35 +00:00
Arvid Norberg 20d4279177 optimized piece picking to not cause busy loops in some end-game modes 2010-12-18 10:19:34 +00:00
Arvid Norberg f4746f4090 verbose logging cleanup 2010-12-01 04:22:03 +00:00
Arvid Norberg e5f980d80d merged uTP branch into trunk (yay) 2010-11-29 01:33:05 +00:00
Arvid Norberg 8737a339c8 refactored verbose peer logging to use format strings 2010-10-31 22:12:26 +00:00
Arvid Norberg e4de1fc8b1 graceful disconnect mode which finishes transactions before disconnecting peers 2010-10-30 08:36:18 +00:00
Arvid Norberg d737dd051d added support for chunked encoding for web seeds 2010-10-27 06:39:18 +00:00
Arvid Norberg a7c87e14dd added functions to query an individual peer's upload and download limit 2010-10-01 16:09:22 +00:00
Arvid Norberg b6f92aa981 added initial support for share-mode 2010-09-05 16:01:36 +00:00
Arvid Norberg 18a3d545b0 fixed potential hang issue when receiving faster than we can handle the incoming messages 2010-08-28 19:44:50 +00:00
Arvid Norberg 9a9c121ec0 fixed assert typo 2010-07-15 06:31:39 +00:00
Arvid Norberg 4c6be42b74 added feature to not count downloaded bytes from web seeds in stats 2010-07-15 06:27:44 +00:00
Arvid Norberg 4e576f93fd removed the session mutex for improved performance 2010-07-14 04:16:38 +00:00
Arvid Norberg 69001e6a6b fixed bug in metadata extensions combined with encryption 2010-06-18 05:44:08 +00:00
Arvid Norberg b882914461 refactored socket reading code to not use async. operations unnecessarily 2010-06-18 04:43:20 +00:00
Arvid Norberg 23ba8c8a72 fixed synchronization issue between download queue and piece picker 2010-05-13 06:29:33 +00:00
Arvid Norberg c26d1631e0 fix bug in web and http seeds shutdown 2010-04-09 05:51:31 +00:00
Arvid Norberg 5224e0c340 complete_ago extension 2010-03-19 18:39:51 +00:00
Arvid Norberg e3a9578e2d fixed some shadow warnings 2010-03-06 07:16:39 +00:00
Arvid Norberg 54b4bc7754 better rate limiter fix 2010-02-21 01:32:57 +00:00
Arvid Norberg cead1b5780 rate limiter fix for metadata extension 2010-02-20 18:56:53 +00:00
Arvid Norberg 348cd22b9a fixed typo 2010-02-09 04:58:16 +00:00
Arvid Norberg fb47469834 experimental support for the BitTyrant choking algorithm 2010-02-09 03:04:41 +00:00
Arvid Norberg 3bc40b9980 fix builds for all combinations of stats and disk stats 2010-01-31 20:32:12 +00:00
Arvid Norberg ca20d2d600 fixed broken build 2010-01-31 20:22:35 +00:00
Arvid Norberg 3691ca847b fixed missing include 2010-01-20 03:01:39 +00:00
Arvid Norberg c9b594fde1 support sending suggest messages based on what's in the read cache. support 'explicit read cache' 2010-01-15 16:45:42 +00:00
Arvid Norberg cdf459dad5 only keep one outstanding duplicate request per peer 2009-12-25 16:52:57 +00:00
Arvid Norberg f612a07b06 more header dependency fixes and some configure header cleanup 2009-12-09 09:55:19 +00:00
Arvid Norberg 8dd244581d header optimizations 2009-11-26 05:45:43 +00:00
Arvid Norberg 2280454a99 support upload-only extension message 2009-11-24 18:49:59 +00:00
Arvid Norberg 6343fe6a6d optimized header dependencies to lower build time 2009-11-23 08:38:50 +00:00
Arvid Norberg e43340c961 made it possible to build without RTTI 2009-11-02 20:43:38 +00:00
Arvid Norberg dcd8bb6718 move stats instrumentation to .cpp file to fix header dependency issue 2009-10-28 19:56:18 +00:00
Georg Rudoy e8327c96b1 Build fixes. 2009-09-17 11:22:18 +00:00
Arvid Norberg 0f62beebb3 improved compile time by moving rate limiter implementation to a cpp file and making it a non-template 2009-09-16 04:41:35 +00:00
Arvid Norberg 35bca49c61 add torrent priority to adjust bandwidth allocation of torrent's peers 2009-09-13 02:24:25 +00:00
Arvid Norberg ddbb35cf7d fixed bug in connect candidate counter 2009-09-09 16:42:52 +00:00
Arvid Norberg 7933132cd9 fixed assert when built with disk stats 2009-08-05 19:02:51 +00:00
Arvid Norberg 137d2d63f5 cleaned up policy. Moved logic from policy to torrent 2009-07-23 04:38:52 +00:00
Arvid Norberg 848a4b2cf2 fixed bug where downloading from peers could stall when downloading at very high rates 2009-07-21 04:29:29 +00:00
Arvid Norberg ae3be201c4 reduced the number of floating point operations to better support systems with no FPU 2009-07-19 04:59:27 +00:00
Arvid Norberg 76db4627f6 another pending_bytes fix 2009-07-01 04:14:43 +00:00
Arvid Norberg f09774607f added upload mode 2009-06-18 22:32:55 +00:00
Arvid Norberg 07bcb3545a converted a whole lot of error strings into error_codes. Documented some previously undocumented alerts as well as all the error codes 2009-06-12 16:40:38 +00:00
Arvid Norberg f0134c1b11 improved disk error handling and expanded use of error_code in error reporting 2009-06-10 08:30:55 +00:00
Arvid Norberg 0283f07aed more buffer categories to help debugging 2009-05-31 22:38:49 +00:00