-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.py
65 lines (48 loc) · 1.48 KB
/
macros.py
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
59
60
61
62
63
64
65
action = 'action'
i = 'i'
id = 'id'
ip = 'ip'
query = 'query'
answer = 'answer'
keys = 'keys'
keys_replic = 'keys_replic'
url = 'url'
html = 'html'
depth = 'depth'
status = 'status'
client_ip = 'client_ip'
client_port = 'client_port'
client_query_id = 'client_query_id'
alive_req = 'alive_req'
alive_rep = 'alive_rep'
ask_succesor_req = 'ask_succesor_req'
ask_succesor_rep = 'ask_succesor_rep'
find_succesor_req = 'find_succesor_req'
find_succesor_rep = 'find_succesor_rep'
ask_predecesor_req = 'ask_predecesor_req'
ask_predecesor_rep = 'ask_predecesor_rep'
set_predecesor_req = 'set_predecesor_req'
set_predecesor_rep = 'set_predecesor_rep'
update_finger_table_req = 'update_finger_table_req'
update_finger_table_rep = 'update_finger_table_rep'
ask_closest_preceding_finger_req = 'ask_closest_preceding_finger_req'
ask_closest_preceding_finger_rep = 'ask_closest_preceding_finger_rep'
ask_url_client_req = 'ask_url_client_req'
ask_url_client_rep = 'ask_url_client_rep'
ask_url_server_req = 'ask_url_server_req'
ask_url_server_rep = 'ask_url_server_rep'
notify_req = 'notify_req'
notify_rep = 'notify_rep'
client_join_req = 'client_join_req'
client_join_rep = 'client_join_rep'
send_html_req = 'send_html_req'
send_html_rep = 'send_html_rep'
ask_url_end_req = 'ask_url_end_req'
ask_url_end_rep = 'ask_url_end_rep'
TIME_LIMIT = 5000 # ms
URL_TIME_LIMIT = 100000 # ms
TIME_FIXFINGERS = 1 # s
TIME_STABILIZE = 1 # s
TIME_SUCCESORS_REFRESH = 1
TIME_INIT_STABLIZE_STUFF = 5 # s
SUCCESORS_NUMBER = 20