/** * Send a message to a named mailbox created from another node. */ public void Send(string node, string name, IOtpErlangObject msg) { // this node? if (node.Equals(home.Node) || node.Equals(home.Alive)) { Send(name, msg); return; } // other node OtpCookedConnection conn = home.GetConnection(node); if (conn == null) { return; } conn.Send(Self, name, msg); }
/** * Send a message to a remote {@link OtpErlangPid pid}, representing either * another {@link OtpMbox mailbox} or an Erlang process. */ public void Send(OtpErlangPid to, IOtpErlangObject msg) { string node = to.Node; if (node.Equals(home.Node)) { home.Deliver(new OtpMsg(to, (IOtpErlangObject)msg.Clone())); return; } OtpCookedConnection conn = home.GetConnection(node); if (conn == null) { return; } conn.Send(Self, to, msg); }