コード例 #1
0
ファイル: Program.cs プロジェクト: RadekJ1992/Clientix
 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
ファイル: Program.cs プロジェクト: RadekJ1992/ATM_Client
        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
ファイル: eLReMixK.cs プロジェクト: RadekJ1992/Clientix
        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
ファイル: Client.cs プロジェクト: RadekJ1992/Clientix
 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);
 }