-
Notifications
You must be signed in to change notification settings - Fork 22
/
GetResponsibleRange.d
58 lines (36 loc) · 1.8 KB
/
GetResponsibleRange.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*******************************************************************************
Turtle implementation of DHT `GetResponsibleRange` request
Copyright:
Copyright (c) 2015-2017 dunnhumby Germany GmbH. All rights reserved.
License:
Boost Software License Version 1.0. See LICENSE.txt for details.
*******************************************************************************/
module fakedht.request.GetResponsibleRange;
/*******************************************************************************
Imports
*******************************************************************************/
import Protocol = dhtproto.node.request.GetResponsibleRange;
/*******************************************************************************
Request implementation
*******************************************************************************/
public scope class GetResponsibleRange : Protocol.GetResponsibleRange
{
import fakedht.mixins.RequestConstruction;
/***************************************************************************
Adds this.resources and constructor to initialize it and forward
arguments to base
***************************************************************************/
mixin RequestConstruction!();
/***************************************************************************
Get the return minimum and maximum allowed hash value this node
is responsible for.
Params:
min = minimal allowed hash
max = maximal allowed hash
***************************************************************************/
override protected void getRangeLimits (
scope void delegate ( hash_t min, hash_t max ) value_getter_dg )
{
value_getter_dg(hash_t.min, hash_t.max);
}
}