send() private method

private send ( Erlang from, Erlang dest, Erlang msg ) : void
from Erlang
dest Erlang
msg Erlang
return void
コード例 #1
0
 public void sendRPCcast(string node, Erlang.Atom mod, Erlang.Atom fun, Erlang.List args, Erlang.Object ioServer)
 {
     if (node.Equals(home.node()))
     {
         throw new System.ArgumentException("Cannot make rpc cast on local node!");
     }
     else
     {
         Erlang.Object       msg  = AbstractConnection.encodeRPCcast(_self, mod, fun, args, ioServer);
         OtpCookedConnection conn = home.connection(node);
         if (conn == null)
         {
             throw new System.Exception("Cannot establish connection to node " + node);
         }
         conn.send(_self, "rex", msg);
     }
 }
コード例 #2
0
ファイル: OtpMbox.cs プロジェクト: trompa/jungerl
 /*
  * Send a message to a named mailbox created from another node.
  *
  * @param name the registered name of recipient mailbox.
  *
  * @param node the name of the remote node where the recipient
  * mailbox is registered.
  *
  * @param msg the body of the message to send.
  *
  **/
 public void send(System.String name, System.String node, Erlang.Object msg)
 {
     try
     {
         if (node.Equals(home.node()))
         {
             send(name, msg);
         }
         else
         {
             OtpCookedConnection conn = home.connection(node);
             if (conn == null)
             {
                 return;
             }
             conn.send(_self, name, msg);
         }
     }
     catch (System.Exception)
     {
     }
 }
コード例 #3
0
ファイル: OtpMbox.cs プロジェクト: trompa/jungerl
 /*
  * Send a message to a remote {@link Pid pid}, representing
  * either another {@link OtpMbox mailbox} or an Erlang process.
  *
  * @param to the {@link Pid pid} identifying the intended
  * recipient of the message.
  *
  * @param msg the body of the message to send.
  *
  **/
 public void send(Erlang.Pid to, Erlang.Object msg)
 {
     try
     {
         System.String node = to.node();
         if (node.Equals(home.node()))
         {
             home.deliver(new OtpMsg(to, (Erlang.Object)(msg.clone())));
         }
         else
         {
             OtpCookedConnection conn = home.connection(node);
             if (conn == null)
             {
                 return;
             }
             conn.send(_self, to, msg);
         }
     }
     catch (System.Exception)
     {
     }
 }