Adrien Béraud
6cd7fdb830
add network id to distinguish different networks
2016-07-25 17:56:40 -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
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
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
44d5a0620c
add reception callbacks
2016-05-02 15:25:14 -04:00