Пример #1
0
 public MP1(Member member, Params param, EmulNet network, Address address, bool log = false)
 {
     this.member       = member;
     this.param        = param;
     this.network      = network;
     this.address      = address;
     this.log          = log;
     this.member.addr  = address;
     this.queue        = new Queue <Message>();
     this.requestCache = new Dictionary <Address, PingRequest>(new AddressComparer());
 }
Пример #2
0
 public Application(string paramFileName)
 {
     param  = new Params(paramFileName);
     en     = new EmulNet(param);
     node   = new MP1[param.EN_GPSZ];
     random = new Random(APPLICATION_SEED);
     for (int i = 0; i < param.EN_GPSZ; i++)
     {
         Member  member = new Member();
         Address addr   = new Address();
         en.ENinit(addr);
         node[i] = new MP1(member, param, en, addr, i == 3);
     }
 }