NAME
AnyEvent::MP::Kernel - the actual message passing kernel
SYNOPSIS
use AnyEvent::MP::Kernel;
DESCRIPTION
This module provides most of the basic functionality of AnyEvent::MP, exposed through higher level interfaces such as AnyEvent::MP and Coro::MP.
This module is mainly of interest when knowledge about connectivity, connected nodes etc. are needed.
GLOBALS AND FUNCTIONS
- $AnyEvent::MP::Kernel::WARN
-
This value is called with an error or warning message, when e.g. a connection could not be created, authorisation failed and so on.
The default simply logs the message to STDERR.
- $AnyEvent::MP::Kernel::PUBLIC
-
A boolean indicating whether this is a full/public node, which can create and accept direct connections form othe rnodes.
- $AnyEvent::MP::Kernel::SLAVE
-
A boolean indicating whether this node is a slave node, i.e. does most of it's message sending/receiving through some master node.
- $AnyEvent::MP::Kernel::MASTER
-
Defined only in slave mode, in which cas eit contains the noderef of the master node.
- snd_to_func $noderef, $func, @args
-
Expects a noderef and a name of a function. Asynchronously tries to call this function with the given arguments on that node.
This fucntion can be used to implement
spawn
-like interfaces. - known_nodes
-
Returns the noderefs of all nodes connected to this node.
- up_nodes
-
Return the noderefs of all nodes that are currently connected (excluding the node itself).
- $guard = mon_nodes $callback->($noderef, $is_up, @reason)
-
Registers a callback that is called each time a node goes up (connection is established) or down (connection is lost).
Node up messages can only be followed by node down messages for the same node, and vice versa.
The fucntino returns an optional guard which can be used to de-register the monitoring callback again.
SEE ALSO
AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/