Commit Graph
315 Commits
Author SHA1 Message Date
Adrien Béraud 9509ebd11d build: add missing include for Windows 2016-10-31 13:54:54 -04:00
Adrien Béraud 8fa5735745 SockAddr: fix broken call to rateLimit 2016-10-11 15:30:50 -04:00
Adrien Béraud 9e2ac99fc2 introduce SockAddr to store IP addresses 2016-09-24 17:54:51 -04:00
Adrien Béraud 3cbeb1bfe8 value: fix compilation on older clang 2016-09-20 17:02:10 -04:00
Adrien Béraud c692a6818c value: optimize chainAll for empty filters 2016-09-08 17:23:20 -04:00
Adrien Béraud efa4742a96 dht: set "connecting" state when waiting for a ping 2016-08-25 00:39:50 -04:00
Adrien Béraud e74b29eefd infohash: add istream operator overload 2016-08-15 16:25:59 -04:00
Adrien Béraud bbab54d592 build with -pedantic-errors, fix pedantic build errors 2016-08-15 14:27:01 -04:00
Adrien Béraud 5343f20ca2 crypto: add key, hash length parameters 2016-08-02 15:08:02 -04:00
Nicolas 6eecfeacba api: Add value creation timepoint (#97) 2016-08-01 15:28:47 -04:00
Adrien Béraud 9ba5113c7a value: increase max value size to 16KiB 2016-08-01 10:52:56 -04:00
Adrien Béraud 6cd7fdb830 add network id to distinguish different networks 2016-07-25 17:56:40 -04:00
Adrien Béraud 426c6b6e6d value: add common crypto ops 2016-07-25 17:55:16 -04:00
Adrien Béraud 7b1c5c9525 infohash: merge Windows includes 2016-07-25 17:29:48 -04:00
Andreas Traczyk 5e90cf3dc7 microsoft compiler support 2016-07-25 17:15:28 -04:00
Simon Désaulniers 01fbe0fd31 dht: make main store a vector<unique_ptr<Storage>>
Since the elements inside are going to be moved constantly during the life of
the node, this design is better. Also, it works around a crash when the store is
resized (elements inside moved) at some point (always happenned the 3rd time)
for some reason. This bug was known when compiled with LLVM >7.3.0 (>clang-703.0.31).
2016-07-22 16:27:10 -04:00
Simon Désaulniers c0b4bf8a46 dht,api: enable optional permanent put on dht
A permanent put is going to be executed once and every time the data expires on
each SearchNode.
2016-07-18 18:11:24 -04:00
Adrien Béraud 3a42846f98 utils: include ws2tcpip.h on Windows 2016-05-28 16:40:56 -04:00
Adrien Béraud 5ca04b1da4 utils: include socket.h 2016-05-27 16:03:30 -04:00
Adrien Béraud c831ec8f16 rng: add include guard 2016-05-27 15:46:45 -04:00
Adrien Béraud d44c59016e network_engine: remove onNewNode return value 2016-05-27 14:54:56 -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 564e97fce7 dht: use 4 listen nodes 2016-05-24 03:44:18 -04:00
Adrien Béraud 6cdc242b6e node: add pendingMesageCount 2016-05-24 03:44:18 -04:00
Adrien Béraud db376aa0a2 scheduler: simplify design 2016-05-22 16:56:47 -04:00
Adrien Béraud 0e7dda680a header cleanup 2016-05-22 16:56:47 -04:00
Adrien Béraud 22958342f1 headers: move inclusion of networking APIs to Infohash 2016-05-20 12:12:44 -04:00
Adrien Béraud 84578f7820 value: reduce size limit to 14KB 2016-05-19 17:28:31 -04:00
Adrien Béraud 9ad21d5c5d dht: remove newSearch() 2016-05-18 01:23:18 -04:00
Adrien Béraud 891969f5eb node: reduce max response time to 1s 2016-05-17 20:39:16 -04:00
Adrien Béraud e68a2fd967 securedht: add public key cache 2016-05-17 20:39:16 -04:00
Adrien Béraud cc18afd818 value: make 'owner' a shared_ptr 2016-05-17 20:39:16 -04:00
Adrien Béraud 79dde3378a dht: increase max searches 2016-05-14 23:16:23 -04:00
Adrien Béraud a926e273af dht: forward-declare more internal structures 2016-05-14 15:48:34 -04:00
Adrien Béraud f1b3e41e63 securedht: override all versions of Dht::get 2016-05-14 15:48:34 -04:00
Adrien Béraud e37307654f make sure securedht methods override dht's 2016-05-13 16:38:23 -04:00
Adrien Béraud d3b9c4b7b6 network engine: improve node packing 2016-05-13 16:38:23 -04:00
Adrien Béraud d26a34f409 node_cache: use std::map 2016-05-13 16:38:23 -04:00
Guillaume Roguez c5da946e76 crypto: mark all operator bool as explicit
If operator bool is not marked as explicit and you try to do such:

a == b

where a and b are instances of class with overloaded bool operator,
the behavior is not the waited one: a and b are casted to bool
BEFORE the comparaison! This could lead into non waited situation.

This patch fixes all operator bool() where overloaded.
This also implements PublicKey operators == and != as needed in value.h.
This last showed a typical case explained upper.

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2016-05-10 15:26:15 -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 8cc53b1751 add node cache, split dhtrunner.h from dht.h 2016-05-08 00:37:52 -04:00
Simon Désaulniers 98a3960bf8 fix wrong std::move in Value::Filter::chain
Also, instance calls to Value::Filter::chain methods were moving the calling
instance while you may not want this in many cases.
2016-05-05 16:29:59 -04:00
Adrien Béraud 92613f5fbf net: improve request state consistency 2016-05-03 18:33:38 -04:00
Adrien Béraud c215bf1d39 net: a pending request is a non-completed request 2016-05-03 13:56:05 -04:00
Adrien Béraud add1179bc2 dht: remove constexpr to preserve backward compatibility 2016-05-03 13:55:18 -04:00
Adrien Béraud 733cf335d3 dht: limit concurrent search requests instead of steps intervals 2016-05-03 12:05:14 -04:00
Adrien Béraud 15f4ea4d88 node: add toString() 2016-05-03 11:09:28 -04:00
Simon Désaulniers 8cce5cd6e8 removed commented duplicate utility function 2016-05-02 15:25:15 -04:00