Commit Graph
176 Commits
Author SHA1 Message Date
Simon Désaulniers 4b13fcac70 fixing various compilation errors 2016-05-02 15:25:14 -04:00
Simon Désaulniers 17216afe0f request status fixups 2016-05-02 15:25:14 -04:00
Simon Désaulniers 2df9cd5363 send* calls to network engine + on done routines 2016-05-02 15:25:14 -04:00
Simon Désaulniers 69fab983f5 [WIP] ondone + searchnode status 2016-05-02 15:25:14 -04:00
Simon Désaulniers 74b265641d checking UDP replytime in network engine 2016-05-02 15:25:14 -04:00
Simon Désaulniers ba8d1af008 using map for ordering searches structures
Now ordering searches by InfoHash in different maps (ipv4 and ipv6). This is a
minor improvement for queries over searches.
2016-05-02 15:25:14 -04:00
Simon Désaulniers 9faef0427f send* methods return NetworkEngine::RequestStatus
Previously, the request id was returned. This was needed for cancelling
requests. Returning std::shared_ptr<RequestStatus> enables cancelling the
requests, checking if a request is done and access to timings concerning this
request. This will replace the SearchNode's RequestStatus.
2016-05-02 15:25:14 -04:00
Simon Désaulniers a1333fcaa5 handling notify listeners when storage changed 2016-05-02 15:25:14 -04:00
Simon Désaulniers f93fb92ff5 add NetworkEngine::processMessage 2016-05-02 15:25:14 -04:00
Simon Désaulniers 2a61d79b42 enabling DHT log in network engine. 2016-05-02 15:25:14 -04:00
Simon Désaulniers 44d5a0620c add reception callbacks 2016-05-02 15:25:14 -04:00
Simon Désaulniers 90b73bca56 add closest nodes buffering methods 2016-05-02 15:25:14 -04:00
Simon Désaulniers 594de2bd88 factorized common dependencies 2016-05-02 15:25:14 -04:00
Simon Désaulniers 48512bfd0f delete packet processing methods in dht.cpp 2016-05-02 15:25:14 -04:00
Adrien Béraud e2e30445dc disable storage maintenance 2016-05-02 15:13:37 -04:00
Adrien Béraud 444cdaa5d6 dht: remove unused code 2016-04-30 03:16:05 -04:00
Adrien Béraud 54143d58bf dht: limit search nodes
* Don't remove candidate nodes (they are counted as "bad" nodes)
* Remove as much nodes as necessary to keep the node count bounded
2016-04-26 15:35:28 -04:00
Adrien Béraud ff2df41c76 dht: improve token serialization 2016-04-19 12:30:00 -04:00
Adrien Béraud 30d5f7bea5 msgpack: add support for 1.4+ 2016-04-14 23:05:37 -04:00
Simon Désaulniers 68fceac433 dht: fixes out of range container erase 2016-04-14 18:07:07 -04:00
Guillaume Roguez 5d9c6090dd dht: ensure to not copy Storage instances
This path deletes copy-constructor and copy-assignement and
default defines move-contructor and move-assignement methods.
Also uses emplace_back than push_back on dht::store vector
to have a better efficiency.

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2016-04-11 11:46:24 -04:00
Simon Désaulniers 2329239843 add delay between two successive refills
3 searchStep calls is what's needed to flag a node expired. So waiting at least
3 times SEARCH_GET_STEP time seems reasonable.
2016-04-08 23:12:09 -04:00
Simon Désaulniers 21667141ad refill Search in unsynced state as much as needed
Search::refilled removed so that any number of refill may be done.
2016-04-08 23:11:02 -04:00
Simon Désaulniers 9e7babc707 changed Search::refill to progressive approach
In order to optimize the refill of a search with good SearchNode, the refill is
now done at each call of searchStep(). A "refill" will try to add more good
nodes to the search until the search has reached SEARCH_NODES good nodes.
2016-04-08 23:10:05 -04:00
Simon Désaulniers e9bda23ae4 add Search::getNumberOfBadNodes() method 2016-04-08 23:10:05 -04:00
Simon Désaulniers 12f4139fcc dht: removing good and expired nodes appropriately
When inserting a node and that the maximum of good nodes has been reached, a
good node must be removed. This is also a good time to remove an expired node
from the search if there is one.
2016-04-08 23:09:58 -04:00
Adrien Béraud 71b6998ea0 dht: step to clear announces in case of failure 2016-01-28 01:07:35 -05:00
Adrien Béraud 1d4d67038a dht: fix compilation on older clang 2016-01-22 15:35:45 -05:00
Adrien Béraud d5dcfa0889 dht: introduce and enforce a maximum storage size
The default storage limit is 64 MB
2016-01-22 02:01:07 -05:00
Adrien Béraud b304418d43 dht: ensure search response include a token 2016-01-22 01:47:19 -05:00
Adrien Béraud 3d499bff14 dht: reset flags when reanouncing 2016-01-22 01:45:51 -05:00
Adrien Béraud d6d72597be dht: check value size before forging packet 2016-01-19 15:24:05 -05:00
Adrien Béraud 3ee22bb6d7 dht: avoid building oversized UDP packets 2016-01-19 15:24:05 -05:00
Adrien Béraud 9ee962bd21 dht: cleanup storage log 2016-01-19 15:23:37 -05:00
Adrien Béraud a44b809513 dht: get token with find_nodes, use it for announces 2016-01-19 15:23:37 -05:00
Adrien Béraud e00c8e9598 update copyright headers for 2016 2016-01-07 18:02:35 -05:00
Adrien Béraud 8d1c3f1bbe dht: drop storage immediately after retransmission 2015-12-17 15:31:41 -05:00
Adrien Béraud e102e2b673 dht: findStorage now returns iterator instead of pointer 2015-12-17 15:31:41 -05:00
Simon Désaulniers 38306eaec5 only one refill allowed before expiring search 2015-12-15 18:18:17 -05:00
Simon Désaulniers 04632a8288 fix findclosestnodes() (was inverted)... 2015-12-15 18:18:14 -05:00
Simon Désaulniers 2dcaef5c97 accept storing values based on XOR proximity to id. 2015-12-15 18:17:37 -05:00
Adrien Béraud 0076ae001c dht: drop value after successfull announce 2015-12-10 17:26:39 -05:00
Adrien Béraud 9a301569a4 dht: use proper value in log 2015-12-10 15:06:25 -05:00
Adrien Béraud 328a61df00 dht: preserve value creation time 2015-12-10 13:18:55 -05:00
Adrien Béraud 04aa3d3dba dht: improve value storage log 2015-12-10 13:18:55 -05:00
Adrien Béraud 7c1beeaa5c Merge pull request #17 from savoirfairelinux/yomgui-patch-dht
Simplify the simplification
2015-12-07 12:01:58 -05:00
Simon Désaulniers 725ca7a4d6 only remove Announce upon value expiration time 2015-11-16 22:15:06 -05:00
Adrien Béraud d1c4d2446e add Simon Désaulniers to author lists 2015-11-13 16:45:43 -05:00
Adrien Béraud 7e346cfcb8 update license terms
* removed OpenSSL exception
  (OpenDHT doesn't make use of OpenSSL)
* properly capitalize "Savoir-faire Linux"
2015-11-08 16:06:30 -05:00
Adrien Béraud 8575bd4f96 dht: allow to specify address family for getPublicAddress 2015-11-06 01:49:13 -05:00