… | |
… | |
42 | |
42 | |
43 | NODE $NODE node_of snd kil port_is_local |
43 | NODE $NODE node_of snd kil port_is_local |
44 | configure |
44 | configure |
45 | known_nodes up_nodes mon_nodes node_is_known node_is_up |
45 | known_nodes up_nodes mon_nodes node_is_known node_is_up |
46 | ); |
46 | ); |
47 | |
|
|
48 | our $CONNECT_INTERVAL = 2; # new connect every 2s, at least |
|
|
49 | our $NETWORK_LATENCY = 3; # activity timeout |
|
|
50 | our $MONITOR_TIMEOUT = 15; # fail monitoring after this time |
|
|
51 | |
47 | |
52 | =item $AnyEvent::MP::Kernel::WARN->($level, $msg) |
48 | =item $AnyEvent::MP::Kernel::WARN->($level, $msg) |
53 | |
49 | |
54 | This value is called with an error or warning message, when e.g. a |
50 | This value is called with an error or warning message, when e.g. a |
55 | connection could not be created, authorisation failed and so on. |
51 | connection could not be created, authorisation failed and so on. |
… | |
… | |
392 | $LISTENER{$bind} = $listener; |
388 | $LISTENER{$bind} = $listener; |
393 | push @$LISTENER, $bind; |
389 | push @$LISTENER, $bind; |
394 | } |
390 | } |
395 | } |
391 | } |
396 | |
392 | |
|
|
393 | $WARN->(8, "node listens on [@$LISTENER]."); |
|
|
394 | |
397 | # the global service is mandatory currently |
395 | # the global service is mandatory currently |
398 | require AnyEvent::MP::Global; |
396 | require AnyEvent::MP::Global; |
399 | |
397 | |
400 | # connect to all seednodes |
398 | # connect to all seednodes |
401 | AnyEvent::MP::Global::set_seeds (map $_->recv, map _resolve $_, @$seeds); |
399 | AnyEvent::MP::Global::set_seeds (map $_->recv, map _resolve $_, @$seeds); |