private NetworkRecieverActor(Actor Reciever, bool IsServer)
 {
     this.formatter = new BinaryFormatter();
     this.IsServer = IsServer;
     if(Reciever is RecieverActor)
         this.Reciever = (RecieverActor)Reciever;
 }
 /// <summary>
 /// Basic Constructor taking in all network items needed.
 /// </summary>
 /// <param name="ServerIP"></param>
 /// <param name="ServerPort"></param>
 /// <param name="ListenPort"></param>
 public TaskManager(string ServerIP, int ServerPort, int ListenPort)
 {
     ManagerActor.LocalPort = ListenPort;
     ManagerActor.ServerIP = ServerIP;
     ManagerActor.ServerPort = ServerPort;
     processor = new Processor();
     nra = new NetworkRecieverActor(processor, false, ManagerActor.LocalPort);
 }
 public Worker(RecieverActor Reciever, int Version)
 {
     if (Reciever is Processor)
     {
         this.Reciever = (Processor)Reciever;
     }
     this.Version = Version;
 }
Пример #4
0
        /// <summary>
        /// Basic Constructor, needs all 3 parameters.
        /// </summary>
        /// <param name="ServerIP"></param>
        /// <param name="ServerPort"></param>
        /// <param name="LocalPort"></param>
        public Node(string ServerIP, int ServerPort, int LocalPort)
        {
            ManagerActor.ServerIP = ServerIP;
            ManagerActor.ServerPort = ServerPort;
            ManagerActor.LocalPort = LocalPort;

            Reciever = new RecieverActor();
            NetworkReciever = new NetworkRecieverActor(Reciever, false, ManagerActor.LocalPort);
        }
 /// <summary>
 /// Basic Constructor
 /// </summary>
 /// <param name="ListenPort"></param>
 public Server(int ListenPort)
 {
     ManagerActor.LocalPort = ListenPort;
     processor = new Processor();
     nra = new NetworkRecieverActor(processor, true, ManagerActor.LocalPort);
 }