コード例 #1
0
 public boolean registeR() {
   String payload;
   Message m;
   boolean result;
   payload = String.format("%s:%s:%d", name, host, port);
   m = new Message(pid, 0, "NULL", payload);
   result = await(m.pack());
   if (result) Utils.out(pid, "Registered.");
   return result;
 }
コード例 #2
0
 public boolean unicast(Message m) {
   boolean drop = false;
   drop = (m.getDestination() == pid && !Utils.SELFMSGENABLED);
   if (!drop) return await(m.pack()); /* write(m.pack()); */
   return false;
 }