ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Kernel.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Kernel.pm (file contents):
Revision 1.94 by root, Wed Mar 14 23:36:33 2012 UTC vs.
Revision 1.95 by root, Wed Mar 21 00:14:25 2012 UTC

294} 294}
295 295
296############################################################################# 296#############################################################################
297# node monitoring and info 297# node monitoring and info
298 298
299=item node_is_known $nodeid
300
301#TODO#
302Returns true iff the given node is currently known to this node.
303
304=cut
305
306sub node_is_known($) {
307 exists $NODE{$_[0]}
308}
309
310=item node_is_up $nodeid 299=item node_is_up $nodeid
311 300
312Returns true if the given node is "up", that is, the kernel thinks it has 301Returns true if the given node is "up", that is, the kernel thinks it has
313a working connection to it. 302a working connection to it.
314 303
315If the node is known (to this local node) but not currently connected, 304If the node is up, returns C<1>. If the node is currently connecting or
316returns C<0>. If the node is not known, returns C<undef>. 305otherwise known but not connected, returns C<0>. If nothing is known about
306the node, returns C<undef>.
317 307
318=cut 308=cut
319 309
320sub node_is_up($) { 310sub node_is_up($) {
321 ($NODE{$_[0]} or return)->{transport} 311 ($NODE{$_[0]} or return)->{transport}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines