… | |
… | |
10 | |
10 | |
11 | This module provides most of the basic functionality of AnyEvent::MP, |
11 | This module provides most of the basic functionality of AnyEvent::MP, |
12 | exposed through higher level interfaces such as L<AnyEvent::MP> and |
12 | exposed through higher level interfaces such as L<AnyEvent::MP> and |
13 | L<Coro::MP>. |
13 | L<Coro::MP>. |
14 | |
14 | |
|
|
15 | =head1 GLOBALS |
|
|
16 | |
|
|
17 | =over 4 |
|
|
18 | |
15 | =cut |
19 | =cut |
16 | |
20 | |
17 | package AnyEvent::MP::Base; |
21 | package AnyEvent::MP::Base; |
18 | |
22 | |
19 | use AnyEvent::MP::Node; |
23 | use AnyEvent::MP::Node; |
… | |
… | |
32 | |
36 | |
33 | our $DEFAULT_SECRET; |
37 | our $DEFAULT_SECRET; |
34 | |
38 | |
35 | our $CONNECT_INTERVAL = 5; # new connect every 5s, at least |
39 | our $CONNECT_INTERVAL = 5; # new connect every 5s, at least |
36 | our $CONNECT_TIMEOUT = 30; # includes handshake |
40 | our $CONNECT_TIMEOUT = 30; # includes handshake |
|
|
41 | |
|
|
42 | =item $AnyEvent::MP::Base::WARN |
|
|
43 | |
|
|
44 | This value is called with an error or warning message, when e.g. a connection |
|
|
45 | could not be created, authorisation failed and so on. |
|
|
46 | |
|
|
47 | The default simply logs the message to STDERR. |
|
|
48 | |
|
|
49 | =cut |
37 | |
50 | |
38 | our $WARN = sub { |
51 | our $WARN = sub { |
39 | warn "$_[0]\n"; |
52 | warn "$_[0]\n"; |
40 | }; |
53 | }; |
41 | |
54 | |
… | |
… | |
176 | # |
189 | # |
177 | } |
190 | } |
178 | } |
191 | } |
179 | }; |
192 | }; |
180 | |
193 | |
|
|
194 | =back |
|
|
195 | |
181 | =head1 SEE ALSO |
196 | =head1 SEE ALSO |
182 | |
197 | |
183 | L<AnyEvent::MP>. |
198 | L<AnyEvent::MP>. |
184 | |
199 | |
185 | =head1 AUTHOR |
200 | =head1 AUTHOR |