Simon Désaulniers
669c08210e
dht: erase find node request status when done
...
This was memory leak and produced inconsistency in SearchNode::canGet timings.
2016-08-22 18:26:53 -04:00
Simon Désaulniers
c04ede4909
dht: unify bootstrapSearch and refill method
...
Since bootstrapSearch was rewritten to use the node cache, it made it clear that
refill should be rewritten as such. However, then bootstrapSearch becomes
irrelevant.
An enhancement to refill is that it will let insertNode review its whole list
of nodes and then let it insert nodes up to SEARCH_NODES nodes. The previous
method would not garantee this behavior since, most of the times, it would pass
less than SEARCH_NODES nodes to insertNode.
2016-08-06 21:14:17 -04:00
Simon Désaulniers
a21d4d4adc
queries: fix deserialization bug
...
Only the first two entries of the array would be accessed in a consistent way.
Therefor, only the two first field value index would be returned.
2016-08-05 21:20:58 -04:00
kaldoran
df3317a5b2
dht: bootstrap from cache instead of routing table
2016-08-03 10:04:02 -04:00
kaldoran
33f95c00a9
NodeCache: getNode takes bool not int
...
Since this was old code which use int as bool I edit that for a bool [and change related code]
2016-08-02 18:57:20 -04:00
Simon Désaulniers
a4834efd37
dht: use queries in dht
2016-07-10 19:26:13 +02:00
Simon Désaulniers
07e4435a07
value: add Query relevant structures
2016-07-10 19:26:04 +02:00
Adrien Béraud
b09e3df2e2
add network id to distinguish different networks
2016-06-21 03:06:47 -04:00
Adrien Béraud
4d75f64576
log: rename ERROR to ERR to build on Windows
2016-05-27 12:30:32 -04:00
Adrien Béraud
ac23464044
network engine: retransmit 'done' param
2016-05-24 03:44:18 -04:00
Adrien Béraud
ce162a39c6
network engine: add logs
2016-05-22 17:00:16 -04:00
Adrien Béraud
ff2193dcc6
network_engine: add log on node expire
2016-05-19 17:37:39 -04:00
Adrien Béraud
f7e01da20d
expire node on blacklist
2016-05-19 17:28:31 -04:00
Adrien Béraud
16290961fb
network engine: add sent data size
2016-05-19 01:55:06 -04:00
Adrien Béraud
bd72c6468f
network engine: handle unexpected node id
2016-05-15 01:36:25 -04:00
Adrien Béraud
a926e273af
dht: forward-declare more internal structures
2016-05-14 15:48:34 -04:00
Adrien Béraud
d3b9c4b7b6
network engine: improve node packing
2016-05-13 16:38:23 -04:00
Adrien Béraud
91bf5bb41b
allow to cancel request without network engine
2016-05-10 12:50:20 -04:00
Adrien Béraud
040e3770ad
node: use requests to determinate state
2016-05-09 16:17:59 -04:00
Adrien Béraud
ef1bf5ccec
move node cache to message engine
2016-05-08 00:37:52 -04:00
Adrien Béraud
92613f5fbf
net: improve request state consistency
2016-05-03 18:33:38 -04:00
Adrien Béraud
820598c179
network engine: change sendError message argument to std::string
2016-05-02 15:25:15 -04:00
Adrien Béraud
d062f7bd24
make sendPing use Node by default
...
previous code was duplicating nodes, causing
sending many "dubious node" pings to the same node.
2016-05-02 15:25:15 -04:00
Adrien Béraud
f9e6662f7d
use Node in tellListener
2016-05-02 15:25:15 -04:00
Adrien Béraud
20662a9b4c
cancel request when receiving token error
2016-05-02 15:25:15 -04:00
Adrien Béraud
995196ce08
clear getStatus after token error
2016-05-02 15:25:15 -04:00
Adrien Béraud
3367043e92
NE fixes
2016-05-02 15:25:15 -04:00
Simon Désaulniers
08dc666839
dht: network engine does the node ping count
2016-05-02 15:25:15 -04:00
Simon Désaulniers
ce8af64775
removed unwanted check when receiving listen request
2016-05-02 15:25:15 -04:00
Simon Désaulniers
97fccc4458
dht: fix drop due to ratelimit bug
2016-05-02 15:25:15 -04:00
Simon Désaulniers
ee31881825
changed license to GPLv3
2016-05-02 15:25:15 -04:00
Simon Désaulniers
dafae934c4
actually cancelling listens when appropriate
...
Just before, listens were "cancelled", but unsued memory in network engine's
data structure would be left there.
2016-05-02 15:25:15 -04:00
Simon Désaulniers
2a88117dd4
netengine: merging RequestStatus, Request
...
This is a change needed to enable easy and clean cancelling of requests from the
upper layer (dht layer). Request's content that was hidden from (dht layer) is
still hidden (private), but enable NetworkEngine as a friend of the Request
class for accessing lower layer attributes.
2016-05-02 15:25:15 -04:00
Simon Désaulniers
72f4d58f7e
dht: fix listen confirmation, getvalues concurency
...
Upon receiving a listen confirmation, a Request structure shall be left alive in
the NetworkEngine's map so that further 'get values' answers for that same
listen can be treated properly. This was sort of handled before, but with a
concurency issue between the set of values returned associated to the listen
request and just before the listenConfirmation was returned.
2016-05-02 15:25:15 -04:00
Simon Désaulniers
d5f67e97d0
dht: let Dht::inserNode set SearchNode reply time
2016-05-02 15:25:15 -04:00
Simon Désaulniers
674f25fcae
fix listen was not handled...
2016-05-02 15:25:15 -04:00
Simon Désaulniers
abd358f57d
fix: 'get' requests responses without values...
2016-05-02 15:25:15 -04:00
Simon Désaulniers
fa94ce90ac
naming consistency changes in network engine
2016-05-02 15:25:15 -04:00
Simon Désaulniers
120dc509cf
fix 'get' request stuck/slow, handling candidates
...
Making a call to searchSendGetValues() when a 'get' request finishes/expires,
accelerates the process in the same way it was done before. Candidates also let
the requests resolve faster.
2016-05-02 15:25:15 -04:00
Simon Désaulniers
ff72487b02
fix no values sent in response to 'find' request
...
This was due to using the wrong InfoHash field from the ParsedMessage when
responding to 'find' request.
2016-05-02 15:25:15 -04:00
Simon Désaulniers
8cc6c21d19
keeping last get reply time in search nodes
2016-05-02 15:25:15 -04:00
Simon Désaulniers
c299385401
add forgotten sendPing signature change
2016-05-02 15:25:15 -04:00
Simon Désaulniers
8b35e2bc09
fix some segfault errors
2016-05-02 15:25:15 -04:00
Simon Désaulniers
82f67f642f
fix wrong nodes serlialisation bug
2016-05-02 15:25:14 -04:00
Simon Désaulniers
407d717c5e
handling request status editing in NetworkEngine
2016-05-02 15:25:14 -04:00
Simon Désaulniers
244877526f
fix blacklisting for wrong reason.
2016-05-02 15:25:14 -04:00
Simon Désaulniers
1e485b1b0c
handling sending requests 3 times before expire
2016-05-02 15:25:14 -04:00
Simon Désaulniers
b74e42eae9
using scheduler for timing dht operations
2016-05-02 15:25:14 -04:00
Simon Désaulniers
8364a61082
moving network stuff to NetworkEngine
...
dht_socket variables can be handled in NetworkEngine. Dht::network_engine now
declared as value instead of std::unique_ptr.
2016-05-02 15:25:14 -04:00
Simon Désaulniers
4b13fcac70
fixing various compilation errors
2016-05-02 15:25:14 -04:00