示例#1
0
 static void Main(String[] args)
 {
     String clientName;
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Clientix c = new Clientix();
     if (args != null) {
         try {
             clientName = args[0];
             c.readConfig(clientName);
             c.connect = true;
         } catch {}
     }
     Application.Run(c);
 }
示例#2
0
        static void Main(String[] args)
        {
            String clientName;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Clientix c = new Clientix();

            if (args != null)
            {
                try {
                    clientName = args[0];
                    c.readConfig(clientName);
                    c.connect = true;
                } catch {}
            }
            Application.Run(c);
        }
示例#3
0
        Clientix parent; //coby móc krozystać z routelist i metod

        #endregion Fields

        #region Constructors

        public eLReMix(Clientix nod)
        {
            parent = nod;
            adresLRM = nod.myAddress.ToString();
            Address temp = Address.Parse(adresLRM);
            temp.host = 0;
            adresRC = temp.ToString();
            temp.host = 1;
            adresCC = temp.ToString();
            kolejkapyt = new ConcurrentQueue<Packet.ATMPacket>();
            kolejkaodp = new List<Packet.ATMPacket>();
            kolejkaS = new ConcurrentQueue<SPacket>();
            atm = new Thread(new ThreadStart(ATMReader));
            atm.IsBackground = true;
            atm.Start();
            s = new Thread(new ThreadStart(SReader));
            s.IsBackground = true;
            s.Start();
            //logowanie
            wyslijSPacket(new SPacket(adresLRM, adresRC, "HELLO " + adresLRM));//logowanie do RC
            wyslijSPacket(new SPacket(adresLRM, adresCC, "HELLO " + adresLRM));//logowanie do RC
        }
示例#4
0
        String adresLRM, adresRC, adresCC;                     //lokalne kopie, coby nie szukać za długo

        public eLReMix(Clientix nod)
        {
            parent   = nod;
            adresLRM = nod.myAddress.ToString();
            Address temp = Address.Parse(adresLRM);

            temp.host        = 0;
            adresRC          = temp.ToString();
            temp.host        = 1;
            adresCC          = temp.ToString();
            kolejkapyt       = new ConcurrentQueue <Packet.ATMPacket>();
            kolejkaodp       = new List <Packet.ATMPacket>();
            kolejkaS         = new ConcurrentQueue <SPacket>();
            atm              = new Thread(new ThreadStart(ATMReader));
            atm.IsBackground = true;
            atm.Start();
            s = new Thread(new ThreadStart(SReader));
            s.IsBackground = true;
            s.Start();
            //logowanie
            wyslijSPacket(new SPacket(adresLRM, adresRC, "HELLO " + adresLRM)); //logowanie do RC
            wyslijSPacket(new SPacket(adresLRM, adresCC, "HELLO " + adresLRM)); //logowanie do RC
        }
示例#5
0
 public Agentix(Clientix parent)
 {
     this.parent = parent;
     netstream = new NetworkStream(parent.managerSocket);
     read = new StreamReader(netstream);
     write = new StreamWriter(netstream);
     sendLoginC = false;
     sendCall = false;
     sendDisconnect = false;
     sendGetClients = false;
     whoIsCalled = "";
     whoToDisconnect = "";
     writeThread = new Thread(writer);
     readThread = new Thread(reader);
 }