i can get it to write one line, but then it is "forcibly stopped" probably because of the way that the client listens for a response.
Send:
case "procls":
Process[] allProcs = Process.GetProcesses();
foreach (Process thisProc in allProcs)
{
string procName = thisProc.ProcessName;
int procID = thisProc.Id;
Console.WriteLine("Process: {0}, ID: {1}", procName, procID);
string proc = ("Process: {0}, ID: {1}" + procName + procID);
byte[] lst = System.Text.Encoding.ASCII.GetBytes(proc);
stream.Write(lst,0,lst.Length);
}
break;
Listen:
stm.Write(ba, 0, ba.Length);
byte[] bb = new byte[100];
int k = stm.Read(bb, 0, 100);
for (int i = 0; i < k; i++)
Console.WriteLine(Convert.ToChar(bb[i]));
any suggestions?