public Message(Id to, Id from, Object msg) { this.To = to; this.From = from; this.Content = msg; }
public void Send(Id to, Object contents) { LocalControl.Send(to,this.LocalId,contents); }
//Class to control the actors. Control the communication and creation of new actors public void Send(Id to, Id fromActor, Object content) { //Send the message content to "to" Message msg = new Message(to, fromActor, content); if (to.Host.Equals(fromActor.Host)) RecieveMessage(msg); else SendMessageRemote(msg); }
public void CreateId() { this.LocalId = new Id(); this.LocalId.ActorIdentifier = this.GetHashCode(); this.LocalId.Host = this.LocalControl.GetHostIp().ToString(); }