Adrien Béraud
8cce9fcb85
search: remove getNextStepTime
2018-02-23 13:50:25 -05:00
Adrien Béraud
e6a2d96622
net: restart socket in case of sigpipe
2018-01-23 11:34:14 -05:00
Adrien Béraud
0420ebcce3
dhtinterface: pass listen filters by value
2018-01-17 11:40:18 -05:00
Sébastien Blin
cb72c104fd
proxy: implement basic DhtProxyClient with the ability to get and put.
...
+ Add an abstract class to describe the Dht
+ Now, we can modify the Dht linked to a SecureDht. So we can choose
between the classic Dht and the Dht using a proxy.
+ Implement a basic client which can Get and Put values on the Dht using
the proxy.
Note: Update dhtnode to have the ability to use the DhtProxyClient.
Todo: Implement Listen, ping, connectivityChanged for the client.
2017-11-20 15:45:29 -05:00
Adrien Béraud
b17c7c2965
dht: reserve address vector size
2017-11-17 02:06:32 +01:00
Adrien Béraud
6d238836ad
dht: return empty search on error
2017-11-17 01:01:47 +01:00
Adrien Beraud
dc99919338
InfoHash: add explicit operator bool()
2017-11-01 11:59:11 -04:00
Adrien Béraud
0a130c7045
dht: update permanent state on announce
2017-10-30 13:12:16 -04:00
Adrien Béraud
a401aea132
dht: simplify searchSendAnnounceValue
2017-10-30 13:12:16 -04:00
Adrien Béraud
6378840d33
dhtnode: allow to cancel a listen operation
2017-10-30 13:12:16 -04:00
Adrien Béraud
63366722a9
dht: reduce verbosity of storage log
2017-10-21 18:01:32 +02:00
Adrien Béraud
cd17858ae1
dht: periodic cleanup of unused quota entries
2017-10-21 18:00:46 +02:00
Adrien Béraud
a789ffe7ae
dht: prevent use-after-free of socket callback
2017-10-20 17:46:27 +02:00
Adrien Béraud
376486e64f
node: use full range of socket IDs
2017-10-17 15:25:09 +02:00
Adrien Béraud
6bc2f19a36
dht: log total number of nodes in onGetValuesDone
2017-10-16 17:12:33 +02:00
Adrien Béraud
63e0c1266a
dht: use OpStatus in put
...
Factorize shared pointers.
2017-10-13 02:07:14 +02:00
Adrien Béraud
1a54aff7bc
storage policies: use SockAddr
...
API-breaking change to use const SockAddr& instead of sockaddr*.
2017-10-13 01:10:09 +02:00
Adrien Béraud
f2b9f8eeda
dht: move bucket time update to routing table
2017-10-13 01:10:09 +02:00
Adrien Béraud
e9f007025f
node: make most fields private
2017-10-13 01:10:09 +02:00
Adrien Béraud
84a45c4f91
dht: factorize shared pointer dereference
2017-10-12 15:44:14 +02:00
Adrien Béraud
024dd42e5a
dht: remove processMessage
2017-10-11 17:36:20 +02:00
Adrien Béraud
3bb5e7ee12
network engine: move transaction ownership to Node
2017-10-11 17:36:20 +02:00
Adrien Béraud
bdb0bef0ee
network engine: move RequestAnswer out of class
2017-10-11 02:22:03 +02:00
Adrien Béraud
97ee4b6fea
dht: move onNewNode to RoutingTable
2017-10-07 11:35:56 +02:00
Adrien Béraud
1c45f34262
SockAddr: use pointer to sockaddr
...
Save memory and reduce copies by using a pointer
to a sockaddr structure of the right size instead of
using a full sockaddr_storage structure for every address.
2017-09-26 16:30:29 +02:00
Adrien Beraud
c40750f6e4
dht: use proper value type to compute expiration
2017-08-10 15:00:34 -04:00
Adrien Beraud
6f3eafc5ee
dht: set refill time even when no nodes where found
2017-07-16 23:30:58 -04:00
Adrien Beraud
83d1cb97c8
dht: cleanup sendCachedPing
2017-07-16 23:30:58 -04:00
Adrien Beraud
477799a2b9
dht: remove unused method
2017-07-16 23:30:58 -04:00
Adrien Beraud
7e8c9ce944
dht: use SockAddr& in makeToken
2017-07-16 23:30:58 -04:00
Adrien Beraud
6decb6609a
dht: use uint64_t to store secret
2017-07-16 23:30:58 -04:00
Adrien Beraud
f1e7cd897d
dht: use crypto::hash
2017-07-16 18:11:06 -04:00
Adrien Beraud
9bfaa224bc
dht: move set_nonblocking to NetworkEngine
2017-07-16 18:10:49 -04:00
Adrien Beraud
5657661249
dht: move Search out of the Dht class
2017-07-16 17:46:54 -04:00
Adrien Beraud
61f91d626b
dht: move Storage, Listener out of the Dht class
2017-07-16 15:04:18 -04:00
Adrien Beraud
732d10713d
dht: minor coverity fixes
2017-07-16 13:39:14 -04:00
Adrien Béraud
7f2b5a44ff
Merge pull request #186 from sim590/search-step-after-announce
...
dht: fix searchstep not scheduled after announcing
2017-04-05 20:12:23 +02:00
Adrien Beraud
25b6df5355
removeExpiredNode: cleanup
2017-04-05 17:52:34 +02:00
Simon Désaulniers
26a7aec7cc
dht: fix searchstep not scheduled after announcing
2017-04-03 17:39:15 -04:00
Adrien Beraud
95d98f4659
rng: add getSeededRandomEngine
...
Add a routine to seed a pseudo-engine to
use the full range of possible internal states
by using seed_seq.
2017-03-07 17:08:46 +01:00
Adrien Béraud
1e7ba56aeb
Merge pull request #174 from sim590/announce-status-fix
...
dht: standardize announce status check
2017-02-16 23:01:10 +01:00
Simon Désaulniers
faf23195a4
dht: standardize announce status check
...
Fixes a bug where some callbacks wouldn't be called when a dummy request was
inserted to cancel some operation while not using the
net::Request::State::COMPLETED flag as per 19c47ec .
2017-02-16 16:29:21 -05:00
Adrien Béraud
0d66b9435f
dht: print IPv6 search log
2017-02-16 11:49:38 -05:00
Adrien Béraud
49353e2d5c
dht: replace expired node only when bucket is full
2017-02-10 00:38:51 -05:00
Simon Désaulniers
9d83ee169b
dht: randomize id in Dht layer
2017-02-07 15:58:04 -05:00
Adrien Béraud
ac65ca5177
add shortcut Sp for std::shared_ptr
2017-01-24 23:38:31 -05:00
Simon Désaulniers
efa6930de2
dht: fix multiple put on a single search segfault
...
"Iterators pointing to an element between the new logical end and the physical
end of the range are still dereferenceable, but the elements themselves have
unspecified values (as per MoveAssignable post-condition)."
- http://en.cppreference.com/w/cpp/algorithm/remove
2017-01-20 02:40:05 -05:00
Simon Désaulniers
19c47ec781
dht: correctly tell if value is announced
...
* A value should be considered announced if all good nodes up to a count of
TARGET_NODES have been tried in the search .
* Bug fix where SearchNode::isAnnounced criteria was not consistent with
announce operation.
2017-01-20 02:39:59 -05:00
Adrien Béraud
bd822fce19
dht: don't stop node insertion on expired search
2017-01-17 16:43:32 -05:00
Adrien Béraud
756e0bd3d8
dht: cleanup paginate
...
Reduce indentation level by 4,
add code documentation,
remain under 120 chars wide.
2017-01-15 19:02:15 -05:00