arvidn
94dcd8e14b
remove unused transaction id member of DHT observers
2017-11-12 15:46:33 +01:00
Alden Torres
c771f16c5c
lint guided refactor in dht source code ( #2516 )
2017-11-12 00:50:24 +01: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
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
pavel.pimenov
7af38ba05a
add const and static
2017-06-30 16:07:23 -04:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
arvidn
a9a12e873f
make DHT bootstrapping more robust by not throwing away nodes
2017-04-25 23:03:52 -04:00
Steven Siloti
cdd50be859
create a separate DHT node for each listen socket
2017-04-23 19:49:49 -04:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00
Andrei Kurushin
713c412682
loop conversion #2 ( #1804 )
...
loop conversions. replace unsafe "erase(iter++)" with "iter = erase(iter)"
2017-03-12 11:34:42 -04:00
pavel.pimenov
78442e9a2c
bdecode_node - add const
2017-02-27 19:44:12 -05:00
arvidn
c15a575e34
remove dependency on aligned_storage and aligned_union to support older versions of GCC
2017-01-22 14:11:44 -05:00
Arvid Norberg
b52419d4d9
make the DHT log output deterministic ( #1550 )
...
make the DHT log output use the search ID rather than a pointer value. Make random_bytes() deterministic in simulations
2017-01-14 22:36:25 -05:00
Andrei Kurushin
78bacfe7c1
fix various build options
2017-01-07 10:49:42 -05:00
Alden Torres
f382936d56
headers, end of file, code cleanup
2016-12-12 23:36:45 -05:00
Alden Torres
dd7179fb10
added a few consts to arguments and local variables
2016-12-10 18:19:14 -05:00
Alden Torres
d5c4cd7280
fixed sign-compare warnings and some refactor ( #1354 )
...
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Alden Torres
86251adb1b
more fixes of integral type conversion warnings
2016-11-21 20:22:18 -05:00
Andrei Kurushin
0a31e26344
fix logging=off build
2016-11-16 23:14:28 -05:00
Alden Torres
4693fcf3f1
dht source code and headers cleanup ( #1150 )
2016-09-24 22:20:20 -04:00
Alden Torres
d9489878a0
rpc_manager log optimization and minor refactor ( #1095 )
...
more on log optimization
2016-09-16 08:21:07 -04:00
Alden Torres
65cdc15543
more on log, consts, refs and cleanup in dht related code ( #1082 )
...
more on log, consts, refs and cleanup in dht related code. moving print_state out of main source code
2016-09-13 08:18:47 -04:00
Alden Torres
5e69dc700c
minor cleanup and refactor ( #1069 )
2016-09-06 18:34:03 -04:00
Alden Torres
29a4075555
refactor to use std::shared_ptr with dht observer ( #1057 )
...
refactor to use std::shared_ptr with dht observer
2016-09-02 21:05:11 -04:00
Alden Torres
fd4c09d7b2
refactor to use std::shared_ptr with traversal_algorithm ( #1056 )
...
refactor to use std::shared_ptr with traversal_algorithm. use a more stable linaro gcc link
2016-09-02 16:42:55 -04:00
Arvid Norberg
44a761e5c8
Merge pull request #1047 from ssiloti/rpcm-cleanup
...
rpc_manager: remove unused timer
2016-08-31 02:04:00 -04:00
Steven Siloti
134d62ab08
rpc_manager: remove unused timer
2016-08-30 19:40:11 -07:00
Alden Torres
658fa46f0a
no warnings in random with openssl-1.1 and minor refactor
2016-08-30 21:23:08 -04:00
Arvid Norberg
e36e5efaba
use boost::string_ref ( #996 )
...
use boost::string_ref/boost::string_view in various parts of the code, in file_storage, some file functions and in bdecode.
2016-08-13 07:04:53 -04:00
Arvid Norberg
71f5510d62
make the random function produce proper random distributions, based o… ( #981 )
...
make the random function produce proper random distributions, based on uniform_int_distribution of C++11. also clean up piece_picker's priority_range to return two results instead of taking pointers to out-parameters. fix recent pe-crypto regression exposed by this change
2016-08-06 13:18:48 -04:00
Arvid Norberg
770935cd46
modernize-use-nullptr ( #894 )
2016-07-09 16:26:26 -04:00
Arvid Norberg
96999ad67f
replace uses of boost::bind with std::bind and lambdas ( #745 )
2016-05-25 00:31:52 -04:00
Arvid Norberg
584d74e2f0
fix union storage hacks ( #670 )
...
remove union storage hacks
2016-05-21 21:04:47 -04:00
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