kaldoran
c08333f213
pht: bit padding when the key is too short
2016-06-29 22:32:13 +02:00
Simon Désaulniers
e775358a07
pht: validKey must check for key field value len
2016-06-20 14:05:39 -04:00
Simon Désaulniers
ea41a747a1
pht: provide simpler lookup callback
...
From a user point of view, the structure Prefix doesn't make sense really. It's
better to provide a simpler callback function signature for the user then.
2016-06-17 16:37:39 -04:00
Simon Désaulniers
81df8982a8
pht: moved some defs in cpp file
2016-06-17 15:44:10 -04:00
Simon Désaulniers
bb3069170c
pht: add key spec, handling maximum prefix length
...
This commit adds the new KeySpec in the Pht constructor signature so that all
keys used inside a same PHT structure have the same maximal length.
2016-06-17 15:44:05 -04:00
Simon Désaulniers
d5e6ef007c
pht: a Key is rather map str:Blob not str:Prefix
2016-06-14 17:46:14 -04:00
Adrien Béraud
08465a6c9a
update for API changes
2016-06-07 12:13:20 -04:00
kaldoran
a5e3597e68
benchmark: timing pht insert operations
2016-06-07 11:47:17 -04:00
kaldoran
0b232b1604
pht: add prefix cache
2016-06-07 11:47:17 -04:00
Simon Désaulniers
0dc7d2722e
Revert "[Bug] Correction of function commonBits"
2016-06-07 11:47:17 -04:00
kaldoran
6d775a10f4
Correction of error on commonBits
2016-06-07 11:47:17 -04:00
kaldoran
8b64f44e2e
Correction of prefix, sometime some bit remain at they default value
2016-06-07 11:47:17 -04:00
Kaldoran
30b92436a2
Fix the autotool Makefile, missing pht include
...
Fix indentation for pull request #37
Fix include error, and use only needed file in pht
Fix implementation of function in pht
2016-06-07 11:47:17 -04:00
Simon Désaulniers
d3e4407f07
add pht insert test
2016-06-07 11:46:24 -04:00
Simon Désaulniers
26f9f6a24e
pht: fix insert always to root bug
...
This makes the pht node recover all indexed data on a DHT node (maximum
MAX_NODE_ENTRY_COUNT per node) so that the pht node can be aware if it has to
split its data in the leaf.
2016-06-07 11:46:24 -04:00
Simon Désaulniers
38de86a260
fix possible out of range error in Prefix ctor
2016-06-07 11:46:24 -04:00
Simon Désaulniers
00d3335ad6
cover empty leaf case in inexact match lookup
...
In case this is inexact match lookup and we end up on an empty leaf (diffrent
than the root), the search goes on in the leaf's sibling subtree.
2016-06-07 11:46:24 -04:00
Simon Désaulniers
fd32e6c42e
pht tools
2016-06-07 11:46:24 -04:00
Simon Désaulniers
90bf572508
add inexact match lookup
...
This is meant to enable random lookup queries.
2016-06-07 11:44:10 -04:00
Simon Désaulniers
599b36b9c6
base pht indexation
2016-06-07 11:44:10 -04:00
Simon Désaulniers
dcca94aab7
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-06-03 17:20:58 -04:00
Adrien Béraud
cf8d9ccd0d
infohash: merge Windows includes
2016-06-02 17:52:07 -04:00
Andreas Traczyk
9e461e0960
microsoft compiler support
2016-06-02 12:17:09 -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