react() public method

public react ( Erlang.NET.OtpActor actor ) : void
actor Erlang.NET.OtpActor
return void
Exemplo n.º 1
0
 public static void Main(string[] args)
 {
     OtpNode a = new OtpNode("a");
     OtpNode b = new OtpNode("b");
     OtpActorMbox echo = (OtpActorMbox)b.createMbox("echo", false);
     b.react(new OtpEchoActor(echo));
     OtpMbox echoback = a.createMbox("echoback", true);
     OtpErlangObject[] v = { echoback.Self, new OtpErlangString("Hello, World!") };
     echoback.send(echo.Self, new OtpErlangTuple(v));
     log.Debug("<- ECHO (back) " + echoback.receive());
     b.close();
     a.close();
 }