Erlang: How to send a message to a registered process on another node
It took me ages to find out how to do this — it is such a simple thing that no-one ever seems to mention it. Assuming that you have a process registered to foo:
register(foo, Pid).
you send it a message from the current node by doing:
foo ! "hello".
and you send it a message from another node by doing:
{ foo, node_name@othernode } ! "hello".
September 29th, 2007 at 12:58 pm
A lot of examples also use rpc:cast in this instance.
November 2nd, 2007 at 3:34 pm
Hi Chris, playing withy I.Ex. at Changi while waiting fora flight to SL. Nice photos. In Kandy for a month. +61 438870873
February 14th, 2009 at 5:28 am
Thanks ! This was very helpful.