Commit Graph
571 Commits
Author SHA1 Message Date
Simon Désaulniers d5f67e97d0 dht: let Dht::inserNode set SearchNode reply time 2016-05-02 15:25:15 -04:00
Simon Désaulniers ba5953bc6b reference instead of copy, removing forgotten cout 2016-05-02 15:25:15 -04:00
Simon Désaulniers 4aad11f003 dht: fix Scheduler::run() job calls order
When executing a job, the internal jobs map can be changed, therefor successive
job calls have to make another call to timers.begin() to get the first job to
execute.
2016-05-02 15:25:15 -04:00
Simon Désaulniers dc1e1d9454 stop stacking jobs now rescheduling instead 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 2f26580881 fix unused variables... 2016-05-02 15:25:15 -04:00
Simon Désaulniers 6a46466493 dht: mybucket grow time optimization
this lets a new network grow faster and appropriately triggers bucket
neighborhood maintenance when intended: when our bucket is growing.
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 d8716e4bd4 adding missing file includes (src,cmake,autotools) 2016-05-02 15:25:15 -04:00
Simon Désaulniers 66e8cf431b add missing MSG_CONFIRM definition 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 e32e480a12 fixing scheduler wrong time returned on run() 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 24527e921a preventing Dht::confirmNode to be auto scheduled twice
Since Dht::confirmNode is called on a connectivity change, Dht::confirmNode
would be scheduled and rescheduling itself all over again and such a chain of
event would be triggered *each* time a connectivity change happenned. We only
want Dht::confirmNode to be called once when a connectivity change happen. Then,
the initial chain of confirmNode calls will go on fine.
2016-05-02 15:25:15 -04:00
Simon Désaulniers 6c0c87a53f fix variable captured in lambda after findNode
findNode requests are not related to searches. No operations other than calling
newNode() is required after a findNode request have completed. NetworkEngine
already takes care of calling newNode().
2016-05-02 15:25:15 -04:00
Simon Désaulniers e001d8560d fix ipv4 vs ipv6 search node dumping properly 2016-05-02 15:25:15 -04:00
Simon Désaulniers 848d95c8b2 Properly handling request status as shared_ptr
this is concerning the shared_ptr objects in SearchNode.
2016-05-02 15:25:15 -04:00
Simon Désaulniers e8ec4bb8b4 fix scheduler wrong returned time upon run()
makes more sense to return the "nextJobTime".
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 cc0d3f4195 all refs to Search are std::shared_ptr 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 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 4383e83dda add initial schedular class. 2016-05-02 15:25:14 -04:00
Simon Désaulniers 0f94e0de0c moved infohash constexpr where appropriate 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
Simon Désaulniers 9e950c8fed serialization and packing methods 2016-05-02 15:24:58 -04:00
Simon Désaulniers 91fa097195 add template erase_if for map 2016-05-02 15:24:58 -04:00
Simon Désaulniers ee3caba05e add intial NetworkEngine class 2016-05-02 15:24:58 -04:00
Adrien Béraud 96f0bffefa python: env on first line 2016-05-02 15:13:37 -04:00
Adrien Béraud e2e30445dc disable storage maintenance 2016-05-02 15:13:37 -04:00