Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     button1.Enabled = false;
     DataReceive dr = new DataReceive(textBox1.Text);
     textBox2.Text=dr.getData()+"\n Data Received From this ip"+dr.ipaddress;
     button1.Enabled = true;
 }
    //internal System.Threading.WaitCallback startTread(ListBox ls)
    internal System.Threading.ThreadStart startTread(clerk.ClerkGUI c)
    {
        while (true)
        {
            n = c;
            //Requesting for Sending Data //
            c.AddToTextBox("Data Send to : "+c.getIp());
            DataSend ds = new DataSend(c.getIp(), "5210");
            ds.sendData("Free");
            //Requesting For
            c.AddToTextBox("\nData Successfully Sent to : " + c.getIp());
            DataReceive dr = new DataReceive("5211");
            c.AddToTextBox("\nData Received"+dr.getData()+"from ip-address"+dr.ipaddress);
            computeIt(dr.getData());

        }
        throw new NotImplementedException();
    }
Ejemplo n.º 3
0
 void ScannerClerk()
 {
     while (true)
     {
         new SendIdleMessage(ipaddress, port);
         //Console.WriteLine("IDLE");
         DataReceive dr = new DataReceive("10001");
         string ip = dr.getData();
         string path = dr.getData();
         //Console.WriteLine(ip);
         //Console.WriteLine(path);
         ScanThread st = new ScanThread(@"C:\Program Files\ClamWin\bin\");
         string temp = path;
         //Console.WriteLine("file Path" + temp);
         st.Working = true;
         st.SetWork(temp);
         while (st.Working == true) ;
         //Console.ReadLine();
     }
 }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     string ManagerIpAddress="172.16.52.125";
     string ManagerPortAddress="10000";
     DataReceive dr = new DataReceive("9000");
     string ipaddress=dr.ipaddress;
     string data = dr.getData();
     Console.WriteLine(data);
     DataSend ds = new DataSend(ManagerIpAddress,ManagerPortAddress);
     ds.sendData(ipaddress);
     ds.sendData(data);
 }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            string      ManagerIpAddress   = "172.16.52.125";
            string      ManagerPortAddress = "10000";
            DataReceive dr        = new DataReceive("9000");
            string      ipaddress = dr.ipaddress;
            string      data      = dr.getData();

            Console.WriteLine(data);
            DataSend ds = new DataSend(ManagerIpAddress, ManagerPortAddress);

            ds.sendData(ipaddress);
            ds.sendData(data);
        }