public void sourceCodeChanged(string lno, string inputs, string mod, string uname)
{
Thread.Sleep(50);
lock (this)
{
if (permissions.Count > 1)
{
string s = inputs.Replace('<', '%');
s = s.Replace('>', '@');
string codechange = "<SourceChange>" + "<Pid>" + Pid.ToString() + "</Pid>" + "<lno>" + lno.ToString() + "</lno>" + "<s>" + s.ToString() + "</s>" + "<mod>" + mod + "</mod>" + "<uname>" + uname + "</uname>" + "</SourceChange>";
AsynchronousSocketListener msocket = conn.getSocket();
string myIP = msocket.GetIP();
string myPort = msocket.GetPort();
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);
}
}
AsynchronousClient client = new AsynchronousClient();
client.SetMultiMsg(tempToSend, codechange, myIP + ":" + myPort);
//Thread t = new Thread(new ThreadStart(client.SendMultiClient));
try
{
client.SendMultiClient();
}
catch (Exception e)
{ Console.WriteLine(e.ToString()); }
}
}
}