Commit Graph

413 Commits

Author SHA1 Message Date
arvidn bf22f56d74 order static and constexpr consistently 2020-02-01 15:18:03 +01:00
Chocobo1 6a88ffc585 update BEP links to www.bittorrent.org domain
This is because previously the links to bittorrent.org will redirect to
another website and then returns http 404 not found.
Also related: https://github.com/bittorrent/bittorrent.org/issues/99
2020-01-26 11:46:16 +01:00
Chocobo1 45a4da4fe6 use https 2020-01-26 11:46:16 +01:00
Arvid Norberg 55460a60bc fix the documentation generation tool to work for flags, and other global constants. Improve documentation 2019-12-19 01:50:22 +01:00
arvidn 4b8f8d7e92 honor proper object lifetime rules 2019-09-28 22:11:54 +02:00
arvidn 7878f68370 add some missing documentation. undeprecate error_file_metadata ahead of master undeprecating it 2019-09-08 10:51:46 +02:00
arvidn c0c4c2083a avoid comparing unrelated pointer in the DHT routing table (which is UB) 2019-08-31 12:54:00 +02:00
Arvid Norberg ff113a262c make it a bit more likely to split the last bucket in the DHT routing table 2019-08-12 15:08:49 -07:00
arvidn b1b03a0d77 factor out and unit test parts of the DHT routing table logic that handles the affinity of nodes to insert. Specifically, make sure the even distribution within routing table buckets works correctly 2019-07-30 07:56:18 -07:00
Arvid Norberg c5d0ea6332 make node and tracker_node explicitly non-movable, since the node contains a non-movable std::mutex 2019-07-29 23:15:09 -07:00
arvidn 3995ffeafd similar to how low RTT DHT nodes are preferred over high RTT nodes, also have an affinity for nodes with node IDs derived from their IP 2019-07-28 16:13:16 -07:00
arvidn ca27892111 avoid empty dht routing table buckets 2019-07-27 07:18:24 -07:00
Chocobo1 d53caf51ab Replace unicode symbol by ascii
MSVC was emitting warning C4819 before this commit.
2019-05-31 16:06:45 +02:00
Arvid Norberg 41a5940100 ensure headers build independently 2019-05-13 11:56:03 -07:00
arvidn 8506f93507 fix more warnings 2019-04-11 18:18:11 +02:00
arvidn 102387f4a8 make all tests run cleanly with leak sanitizer 2019-03-27 17:10:36 +01:00
arvidn 5929ad4cae merge RC_1_1 into master (again) 2018-11-15 22:55:52 +01:00
arvidn 29cddaa23e merged RC_1_1 into master 2018-11-15 15:19:24 +01:00
arvidn 164982c63a pass the dht item object by const reference instead of by value 2018-11-15 00:18:53 +01:00
arvidn 4d88c83576 add rvalue reference overloads for add_torrent_params, settings_pack and session_params. Those structures are pretty large so being able to take them by rvalue reference may be beneficial 2018-11-13 08:05:56 +01:00
Arvid Norberg a5da48edd4 add missing boost/noncopyable include 2018-10-25 09:47:21 +02:00
arvidn c9cbb122e2 fix some warnings from sonar-cube 2018-09-05 18:10:57 -07:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
arvidn 4633258fbe make the DHT announce flags a strong type 2018-07-16 12:04:16 +02:00
Steven Siloti 961cf62cad dht: announce with per-interface listen port 2018-07-12 08:36:57 +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
Alden Torres 8da635d1f5 minor code cleanup, more use of const 2018-05-01 23:03:29 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
arvidn 5413eae900 declare tag types in-line 2018-03-23 11:21:08 +01:00
arvidn 9df4d4b7f8 replace typedef with using. replace NULL with nullptr. cleanup page_aligned_allocator 2018-03-23 11:19:46 +01:00
Alden Torres 670c8a82ad minor dht headers code cleanup and lint oriented refactor 2018-02-14 22:35:26 +01:00
Alden Torres 5d230a69f2 minor code cleanup 2018-01-30 12:38:08 +01:00
arvidn 65fef972a2 apply some c++11 modernization 2018-01-11 04:51:39 -05:00
arvidn 62bf524e75 disable DHT logging with the TORRENT_DISABLE_LOGGING macros as well 2017-12-23 12:01:18 +01:00
arvidn 94dcd8e14b remove unused transaction id member of DHT observers 2017-11-12 15:46:33 +01:00
arvidn f41d2b5d3b move shared_ptr instead of copying them, when constructing DHT observers 2017-11-08 23:09:43 +01:00
Steven Siloti 8648de3706 DHT nodes should only handle requests on their socket (#2355) 2017-09-21 21:00:38 -07:00
arvidn 8d6b51d54c minor cleanups 2017-09-16 13:48:11 +02:00
arvidn 93bb84d94c some random cleanup 2017-09-13 08:28:46 +02:00
arvidn bb51dcdbb9 move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace 2017-09-04 22:38:16 +02:00
arvidn 7b98af8145 improve type-safety of observer_flags and traversal_flags 2017-08-05 20:20:13 +02:00
arvidn 6b1037eff5 convert enum values that are just used as constants, to actual constants with the correct type 2017-08-04 15:23:20 +02:00
arvidn 8d0f38930e make udp send flags type safe 2017-07-26 18:09:17 -07:00
Steven Siloti f0ae2145ea use a handle class for listen sockets instead of raw pointers
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.

To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Alden Torres 80036f0377 avoid executing timed async task if the dht node is already removed (#2133) 2017-07-08 08:32:24 -07:00
arvidn dc76f8a769 start a document of changes from 1.1 to 1.2 2017-06-30 08:29:47 -04:00
arvidn f85c01cc0a merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
Alden Torres 48ef3b6bf7 implemented support for BEP 51 (#1652) 2017-06-12 11:54:11 +02:00
Pavel Pimenov 98a0344196 refactor traversal_algorithm look_for_nodes (#1982) 2017-05-29 12:20:52 -04:00