Exemplo n.º 1
0
 public MapSender(NetConnection nClient, Infiniminer.InfiniminerServer nInfs, Infiniminer.InfiniminerNetServer nInfsN, int nMAPSIZE, bool compress)
 {
     client = nClient;
     infs = nInfs;
     infsN = nInfsN;
     MAPSIZE = nMAPSIZE;
     compression = compress;
     //finished = false;
     conn = new Thread(new ThreadStart(this.start));
     conn.Start();
     DateTime started = DateTime.Now;
     TimeSpan diff = DateTime.Now - started;
     while (!conn.IsAlive&&diff.Milliseconds<250) //Hold execution until it starts
     {
         diff = DateTime.Now - started;
     }
 }
Exemplo n.º 2
0
        public MapSender(NetConnection nClient, Infiniminer.InfiniminerServer nInfs, Infiniminer.InfiniminerNetServer nInfsN, int nMAPSIZE, bool compress)
        {
            client      = nClient;
            infs        = nInfs;
            infsN       = nInfsN;
            MAPSIZE     = nMAPSIZE;
            compression = compress;
            //finished = false;
            conn = new Thread(new ThreadStart(this.start));
            conn.Start();
            DateTime started = DateTime.Now;
            TimeSpan diff    = DateTime.Now - started;

            while (!conn.IsAlive && diff.Milliseconds < 250) //Hold execution until it starts
            {
                diff = DateTime.Now - started;
            }
        }