Commit Graph

129 Commits

Author SHA1 Message Date
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Steven Siloti 2d9a6b76f1 use asio::protcol instead of an enum/bool 2016-04-24 15:18:47 -07:00
Steven Siloti 2abd9867ce IPv6 DHT support
Fixes #110
2016-04-24 14:26:57 -07:00
Andrei Kurushin 7b5d48c02a fix default release build with VS2015 UP2 compiler warnings (#624)
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn 06b52f1421 some cleanup of the dht_socket_interface and fix tests and simulations to build with the dht disabled 2016-01-18 14:34:42 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn 01e6b93854 simplify and improve unit test for distance_exp. make some immutable variables const in the DHT implementation. instead of waking up periodically just to check if it's time to refresh the DHT secret key, set the timer to only wake up to refresh the key. If we don't have a DHT observer (to ask for our external IP) or if we don't know our external IP, don't generate a node ID based on 0.0.0.0, just generate a random ID instead. Simplified and improved node replacement logic in the routing table a little bit 2016-01-01 16:42:37 -05:00
arvidn 8732863a9a another fix to receiving malformed DHT error message 2015-12-03 01:08:27 -05:00
arvidn 7540a6e5cc correctly check incoming DHT error messages 2015-11-30 18:02:00 -05:00
Thomas Yuan 603ef84c65 Fix observer_size. 2015-11-23 11:06:20 -05:00
Thomas Yuan 194ad410dc Make dht_put_alert more accurate. 2015-11-20 00:06:08 -05:00
Thomas Yuan d6bb387ab9 Use dht_settings directly instead of add a read_only member variable.
Since rpc_manager has a reference of dht_settings, needn't pass it
as a parameter for incoming().
2015-09-08 10:35:30 -04:00
Thomas Yuan 3d4ed9f37f Add read-only support in dht_settings and outgoing query messages. 2015-09-07 14:24:46 -04:00
Thomas Yuan ef16ae4e27 Handle response with unexpected format. 2015-08-31 22:37:46 -04:00
Thomas Yuan 71b6b3c262 Fix bug caused by RP #96. 2015-08-31 18:13:47 -04:00
Arvid Norberg 746cd4c1a6 Merge pull request #96 from thomas-yuan/master
Parsing message correctly when message type is error.
2015-08-22 10:42:01 +02:00
Thomas dbfc2fd5ea Parsing message correctly when message type is error.
Also, an error response should call reply() of observer, instead of timeout().

Reference: http://www.libtorrent.org/dht_store.html#errors
2015-08-19 22:20:48 -04:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn a91e7ce25d fix warnings 2015-08-06 02:30:06 -04:00
arvidn 5657772114 limit how often the DHT can wake up 2015-07-28 23:04:15 -04:00
Alden Torres 761486ce43 Using PRId64 macro for portability. 2015-07-12 13:05:29 -04:00
Alden Torres 89f3b3bee3 Using the standard log method for round trip time in rcp_manager. 2015-07-12 12:59:38 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 0052fa6c19 some cleanup to dht observers (don't expose internals) 2015-05-22 02:42:26 +00:00
Arvid Norberg 88fe6eba9c fix issues introduced in dht logging patch 2015-05-17 20:59:18 +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 494b425ea1 fix warnings and a peer logging bug 2015-05-10 18:38:10 +00:00
Arvid Norberg 242dad0743 fix dht build 2015-05-10 18:24:09 +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 a15bc13392 build fixes 2015-04-26 13:38:56 +00:00
Arvid Norberg 4d15f1410f fix warnings, some clean-up and todo comments 2015-04-20 04:52:49 +00:00
Arvid Norberg 1b07ec491d fix build issue out of recent changes of exported functions 2015-03-16 04:38:28 +00:00
Arvid Norberg 37225b71ae const static -> static const (thanks gubatron). helps swigs parser 2015-03-14 00:42:27 +00:00
Arvid Norberg 65a9d76938 fix dht logging build 2015-03-13 05:53:22 +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 601f0dc434 merged changes from RC_1_0 2014-11-03 06:15:51 +00:00
Arvid Norberg 51f2aafb43 clean up some time_t and srand() uses 2014-08-16 20:55:44 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg 36e8945968 more build fixes 2014-06-29 19:11:15 +00:00
Arvid Norberg e225259481 fix some msvc warnings 2014-05-10 03:23:05 +00:00
Arvid Norberg 0e04ab8d72 reorder the node-list in the DHT traversal algorithm if a node updates its ID 2014-03-03 05:09:53 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg 6c22d426d4 make all unit tests pass msvc's /RTCc instrumentation (no implicit integer truncation in casts) 2014-02-05 09:38:32 +00:00
Arvid Norberg e0644ce8f5 invariant check macro fixes 2014-01-21 19:26:09 +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 4a7543bdb8 remove a DHT observer right away when the response has an invalid node ID 2014-01-17 05:16:37 +00:00
Arvid Norberg db6a22d5c1 handle DHT error responses correctly 2014-01-03 08:02:53 +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