public void addPermissionRequest(string myIP, string myPort, string inputcode, string IPPort, string read, string write)
{
try
{
string myIPPort = myIP + ":" + myPort;
string code = inputcode.Replace('<', '%');
code = code.Replace('>', '@');
//string IPPort = theIP + ":" + thePort;
if (read == "false")
{ }
else
{
string[] privileges = { read, write };
permissions[IPPort] = privileges;
if (permissions.Count > 1)
{
List<string> endPoints = Peers();
Hashtable temp = conn.GetIPtoPeer();
Hashtable tempToSend = new Hashtable();
foreach (DictionaryEntry item in temp)
{
if (endPoints.Contains(item.Key.ToString()))
{
tempToSend.Add(item.Key, item.Value);
}
}
code = "<NewProg>" + "<Code>" + code + "</Code>" + "<Pid>" + Pid + "</Pid>" + "<Owner>" + owner + "</Owner>" + "<IPPort>" + IPPort + "</IPPort>" + "<Read>" + read + "</Read>" + "<Write>" + write + "</Write>";
code = code + InitialXMLString().ToString() + "</NewProg>";
BuildList();
//Console.WriteLine(code); //this line is a part of test1
AsynchronousClient client = new AsynchronousClient();
client.SetMultiMsg(tempToSend, code, myIPPort);
Thread t = new Thread(new ThreadStart(client.SendMultiClient));
t.IsBackground = true;
t.Start();
}
}
}
catch (Exception e)
{ Console.WriteLine(e.ToString()); }
}
public void outgoingResult(string index, string result)