--- AnyEvent-MP/MP.pm 2009/08/01 07:36:30 1.4 +++ AnyEvent-MP/MP.pm 2009/08/01 07:44:02 1.5 @@ -54,7 +54,7 @@ (connected to a master node only). Only when they epxlicitly "become public" can you send them messages from unrelated other nodes. -=item noderef - C, C +=item noderef - C, C, C A noderef is a string that either uniquely identifies a given node (for private and hidden nodes), or contains a recipe on how to reach a given @@ -368,7 +368,10 @@ =head1 NODE MESSAGES -Nodes understand the following messages sent to them: +Nodes understand the following messages sent to them. Many of them take +arguments called C<@reply>, which will simply be used to compose a reply +message - C<$reply[0]> is the port to reply to, C<$reply[1]> the type and +the remaining arguments are simply the message data. =over 4 @@ -402,7 +405,11 @@ =item eval => $string[ @reply] Evaluates the given string. If C<@reply> is given, then a message of the -form C<@reply, $@, @evalres> is sent (C<$reply[0]> is the port to reply to). +form C<@reply, $@, @evalres> is sent. + +Example: crash another node. + + snd $othernode, eval => "exit"; =cut @@ -416,6 +423,12 @@ Replies the the current node time to C<@reply>. +Example: tell the current node to send the current time to C<$myport> in a +C message. + + snd $NODE, time => $myport, timereply => 1, 2; + # => snd $myport, timereply => 1, 2,