Commit Graph

144 Commits

Author SHA1 Message Date
Alden Torres 25ed70b977 Create dht_storage_counters to avoid internal counter in future public API. 2015-09-21 07:46:23 -04:00
Alden Torres e2d682275a Implementing and using new dht storage interface 2015-09-16 08:30:27 -04:00
Steven Siloti 86fd8c3048 enable arbitrary direct dht requests and extension dht requests
If you're wondering why I used an alert for handling responses but not requests,
it's because the former was easy to do that way but the latter would have
involved some major refactoring or kludging. The DHT node is written with the
(IMO reasonable) assumption that all responses will be generated immediately, so
there was no way to easily accommodate getting a response asynchronously via
an alert.
2015-08-10 20:33:04 -07:00
Arvid Norberg 27c5a28637 Merge pull request #70 from thomas-yuan/master
Call callback function immediately when get data for mutable data.
2015-08-08 21:51:18 -04:00
Thomas e51b61870a Call callback function immediately when get mutable data. 2015-08-08 20:28:53 -04:00
arvidn a91e7ce25d fix warnings 2015-08-06 02:30:06 -04:00
Alden Torres 5c8c9cd653 Refactor to expose a more convenient get_peers function as part of the DHT api.
Now announce (a particular case of get_peers DHT operation) uses the function get_peers.
2015-06-24 21:22:24 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 84849f3afd some msvc fixes 2015-05-30 21:46:59 +00:00
Arvid Norberg 06bf225237 fix release build and tune want_tick 2015-05-26 20:09:19 +00:00
Arvid Norberg 9856a1fe0c break out more tests from test_primitives 2015-05-23 01:38:47 +00:00
Arvid Norberg 99de70604a remove dht-verbose logging build configuration. tie it to the main logging configuration (which now is on by default) and make it less costly when dht logging alerts are disabled 2015-05-16 19:29:49 +00:00
Arvid Norberg 2819d5f68e remove the remains of the dht logging 2015-05-10 05:28:50 +00:00
Arvid Norberg b60934288b turn DHT logging into alerts instead of writing to a file 2015-05-10 04:54:02 +00:00
Arvid Norberg ca581f2258 rename dht::node_impl -> dht::node, since this hasn't been a pimpl for quite a while 2015-05-09 19:00:22 +00:00
Arvid Norberg 6557910c7f remove the DHT's last dependency on session_impl 2015-05-09 18:06:02 +00:00
Arvid Norberg 93a19b44c0 fix another format string issue and add comments to kademlia 2015-04-26 06:25:08 +00:00
Arvid Norberg f5629eb403 cleanup and fixing of more warnings 2015-04-21 00:23:00 +00:00
Arvid Norberg 4d15f1410f fix warnings, some clean-up and todo comments 2015-04-20 04:52:49 +00:00
Arvid Norberg 21751347bc more warnings fixes and cleanup 2015-04-19 06:28:21 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +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 58d93e5aa1 add new (non-deprecated) access to dht stats, asynchronously via an alert 2015-01-17 17:02:58 +00:00
Arvid Norberg 35b41858cf deprecated session_status and session::status() in favor of performance counters 2015-01-04 21:31:02 +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 aae56c991c merged changes from RC_1_0 2014-11-08 16:58:18 +00:00
Arvid Norberg 3742fd2699 merged changes from RC_1_0 2014-11-02 09:41:29 +00:00
Arvid Norberg 34af25beaa merged chagnes from RC_1_0 2014-11-01 22:47:56 +00:00
Arvid Norberg a91848962a merge changes from RC_1_0 2014-10-12 04:18:34 +00:00
Arvid Norberg 8cbef3876a post alert on outgoing get_peers 2014-09-22 19:49:32 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg 8403e58f3c make dht test program able to get and put mutable items. fixed some DHT bugs along the mutable put/get path 2014-03-02 23:35:35 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg fec7407461 send implied_port in dht announce messages when uTP is enabled 2014-01-20 06:35:06 +00:00
Arvid Norberg 54bbd3cae0 support salt feature in DHT put 2014-01-03 04:18:46 +00:00
Arvid Norberg d6b1aa4c36 DHT refactoring and support for storing arbitrary data with put 2013-12-27 04:28:25 +00:00
Arvid Norberg 4e6b1cfbfb update copyright 2013-12-25 17:07:16 +00:00
Arvid Norberg d03d50b6a8 reorder some more fields to reduce padding 2013-11-26 02:23:33 +00:00
Arvid Norberg afd80cffb7 add option to enforce node ID in the DHT 2013-10-14 01:03:43 +00:00
Arvid Norberg 50f051433a merged DHT change from RC_0_16 2013-10-13 23:04:40 +00:00
Arvid Norberg 12fd5be372 fix bug in ed25519 DHT signature verification. removed RSA code as it's no longer used. add CAS feature (compare and swap) to DHT put command. update dht_store documentation 2013-09-03 00:45:48 +00:00
Arvid Norberg 919bc46422 fix key length issue 2013-08-19 08:07:54 +00:00
Arvid Norberg 6bd07fd65f pull in an ed25519 implementation and replace use of RSA in the DHT with ECC. fix up makefiles 2013-08-18 16:01:20 +00:00
Arvid Norberg 1df950df1d documentation: hide internal functions, include inline functions, support section overviews, hide detail namespace 2013-07-21 21:23:21 +00:00
Arvid Norberg f12e1c1a3f merged DHT fix from RC_0_16 2012-11-16 22:25:39 +00:00
Arvid Norberg bff648a89e update copyright dates and add tool to do so 2012-10-02 03:16:33 +00:00
Arvid Norberg cf49986e1a one more uninitialized member 2012-05-03 03:56:40 +00:00
Arvid Norberg cec9a16cc1 back-ported observer for set_external_ip for DHT 2012-04-30 06:30:35 +00:00
Arvid Norberg 918dce1341 back-ported part of the alert_dispatcher patch for the DHT 2012-04-30 05:39:35 +00:00
Arvid Norberg cafbf2ca1d more work on minimizing shared object export symbol table 2012-03-20 03:53:07 +00:00
Arvid Norberg a2521bd23c fix a bunch of issues to properly support dynamic linking of libtorrent with visibility=hidden. Still requires a small patch to boost 2012-03-18 23:31:04 +00:00
Arvid Norberg ef61b32d9e fix unit test build on windows 2012-01-19 08:01:38 +00:00
Arvid Norberg 6fa1827c39 add support for mutable put/get functions in DHT 2011-05-25 02:26:07 +00:00
Arvid Norberg 6830eb10a9 remove old search code from DHT. modify announce-item to fit with more recent proposal of get/put. Only immutable entries for now 2011-05-23 05:07:52 +00:00
Arvid Norberg 58d723012a support DHT scrape 2011-05-23 00:45:36 +00:00
Arvid Norberg 141ada013f fixed a whole bunch of build warnings on gcc and msvc, along with some fixes discovered along the way 2011-02-21 05:24:41 +00:00
Arvid Norberg de28a57954 add back version in DHT packets 2011-01-23 02:02:04 +00:00
Arvid Norberg ba0aed2282 initial support for DHT RSS feeds 2011-01-19 05:57:44 +00:00
Arvid Norberg b49999b76e made the DHT implementation slightly more robust against routing table poisoning and node ID spoofing 2011-01-08 08:54:51 +00:00
Arvid Norberg b56a1638ae DHT fixes. fixed bucket refresh issue. re-introduced refreshing our own bucket regularly. added more DHT instrumentation in session_status. added alert for when bootstrap is complete. Fixed bootstrap to ping remaining nodes when search is complete. Completed recent DHT observer rewrite to remove some redundant fields 2010-12-12 03:17:08 +00:00
Arvid Norberg 1e82df3e45 support partial hash DHT lookups 2010-12-06 06:39:16 +00:00
Arvid Norberg f21251cba8 limit number of torrents tracked by DHT and support DHT name lookups 2010-11-27 03:09:28 +00:00
Arvid Norberg d3a8916f02 further simplify the DHT by getting rid of the result type and just using observers instead. This might save some memory and should fix the assert that would be triggered before 2010-11-05 19:06:50 +00:00
Arvid Norberg 11cd7af4e7 optimized DHT routing table memory usage 2010-01-03 11:08:39 +00:00
Arvid Norberg bd881ac154 fixed more link issues on windows. examples build with shared linking on windows 2009-12-02 17:46:25 +00:00
Arvid Norberg 6343fe6a6d optimized header dependencies to lower build time 2009-11-23 08:38:50 +00:00
Arvid Norberg 3dc190da6e dht fix 2009-10-23 20:29:26 +00:00
Arvid Norberg 8a5b7d5d36 got rid of the last recursive mutexes. abstracted the threading primitives (and switched over to use asio's internal ones). 2009-10-20 02:49:56 +00:00
Arvid Norberg cee42ff5a1 more DHT simplifications 2009-10-07 20:51:02 +00:00
Arvid Norberg dfccf0b412 some DHT work 2009-09-29 17:06:08 +00:00
Arvid Norberg 138fb8c679 extended DHT unit test to include error reporting 2009-09-27 17:41:51 +00:00
Arvid Norberg f36688a364 initial support for torrent tag store in DHT 2009-09-27 03:38:41 +00:00
Arvid Norberg 54cce9da60 simplified and optimized the DHT implementation 2009-09-20 00:23:36 +00:00
Arvid Norberg 310b9d0e51 windows build fixes (and one msvc warning fix) 2009-07-20 01:54:51 +00:00
Arvid Norberg 00d02f7859 improved DHT get_peers code. get_peers always returns nodes now, and announce_peer is always sent to the k closest nodes to the info-hash. This should significantly speed up retrieving peers from the DHT 2008-12-23 20:04:12 +00:00
Arvid Norberg 09b3a865ef fixed compiler flags in pkg-config file and made header files not depend on the NDEBUG define 2008-11-29 21:33:21 +00:00
Arvid Norberg beb9dbfc03 cleaned up DHT error handling and logging. Made it use lazy_bdecode for improved performance 2008-11-11 17:51:02 +00:00
Arvid Norberg 473f75e98a DHT fix where the node_id would get set after it was started and be inconsitent with rpc_manager and routing_table 2008-11-11 08:33:34 +00:00
Arvid Norberg 399c4d6ac4 mutex fix for dht status reporting 2008-10-09 03:32:57 +00:00
Arvid Norberg 0338510b9b added more bandwidth monitoring of DHT and TCP/IP overhead. added monitoring of the running DHT lookups 2008-09-20 17:42:25 +00:00
Arvid Norberg c88071ae10 fixed race when adding router nodes to the dht (router nodes should be added before it's started) 2008-09-02 06:37:40 +00:00
Arvid Norberg bbf9c83edc initial support for icmp errors in the DHT 2008-05-08 00:22:17 +00:00
Arvid Norberg c7e6c04705 switched over to asio from boost-1.35 2008-05-03 16:05:42 +00:00
Arvid Norberg af6c0a73c5 fixed dht asserts 2008-02-10 02:26:45 +00:00
Arvid Norberg fd42f3232b upnp more logging and error recovery 2007-09-01 04:08:39 +00:00
Arvid Norberg 99a22dcae4 made dht requests be allocated in a pool allocator for heap and runtime efficiency. Fixes to DHT error responses 2007-05-23 08:45:12 +00:00
Arvid Norberg 573d9f55d6 fixed compilation error when not using boost.date_time. Fixed compilation error when not having DHT logging enabled 2007-05-12 18:24:14 +00:00
Arvid Norberg 9f902e7b9f the DHT now refreshes buckets properly. 2007-05-12 01:52:25 +00:00
Arvid Norberg 306d015924 added a timer abstraction and replaced the use of boost.date_time. the timers used now are QueryPerformanceCounter on windows, mach_absolute_time on darwin and currently falls back on boost.date_time on other platforms. This has the advantage of being a monotonic clock, and also slightly more efficient 2007-04-04 22:27:36 +00:00
Arvid Norberg 910733f29e added proper support for dht router nodes (which are automatically used to bootstrap from, and won't get added to the routing table) 2006-09-27 17:20:18 +00:00
Arvid Norberg dc2e25141c changed sequencial download threshold api, it is now per torrent 2006-09-04 23:22:21 +00:00
Arvid Norberg 2daaa9f8d2 fixed bug in allocate_resources, made the refresh timers more accurate and tries to even out the load bu not refreshing more than one bucket at a time 2006-08-06 16:36:00 +00:00
Arvid Norberg 5ef57265bf first version with DHT support. Limited pipelining used by url-seeds. Fixed one configuration problem on FreeBSD. 2006-08-01 15:27:08 +00:00