--- AnyEvent-MP/MP.pm 2009/08/27 07:12:48 1.62 +++ AnyEvent-MP/MP.pm 2009/08/27 21:29:37 1.63 @@ -13,9 +13,7 @@ $SELF # receiving/own port id in rcv callbacks # initialise the node so it can send/receive messages - initialise_node; # -OR- - initialise_node "localhost:4040"; # -OR- - initialise_node "slave/", "localhost:4040" + initialise_node; # ports are message endpoints @@ -74,7 +72,7 @@ Ports allow you to register C handlers that can match all or just some messages. Messages will not be queued. -=item port id - C +=item port ID - C A port ID is the concatenation of a noderef, a hash-mark (C<#>) as separator, and a port name (a printable string of unspecified format). An @@ -91,9 +89,9 @@ public nodes, but do not need an open port) or public nodes (connectable from any other node). -=item noderef - C, C, C +=item node ID - C<[a-za-Z0-9_\-.:]+> -A node reference is a string that either simply identifies the node (for +A node ID is a string that either simply identifies the node (for private and slave nodes), or contains a recipe on how to reach a given node (for public nodes). @@ -146,16 +144,14 @@ =item $thisnode = NODE / $NODE The C function returns, and the C<$NODE> variable contains the -noderef of the local node. The value is initialised by a call to +node id of the local node. The value is initialised by a call to C. -=item $noderef = node_of $port +=item $nodeid = node_of $port -Extracts and returns the noderef from a port ID or a noderef. +Extracts and returns the noderef from a port ID or a node ID. -=item initialise_node $noderef, $seednode, $seednode... - -=item initialise_node "slave/", $master, $master... +=item initialise_node $profile_name Before a node can talk to other nodes on the network it has to initialise itself - the minimum a node needs to know is it's own name, and optionally