Advertisement
parabola949

Untitled

May 2nd, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. if (msg == "STATUS") Response.SendStatus(stream, _clients.Count.ToString());
  2. if (msg == "DUMPLIST") DumpList();
  3.  
  4.  
  5. private void DumpList()
  6.         {
  7.             using (var sw = new StreamWriter(@"C:\AlertServiceLogs\clients.csv", false))
  8.             {
  9.                 foreach (var c in _clients)
  10.                     sw.WriteLine("{0},{1},{2},{3}", c.ComputerName, c.Connected, c.TClient.Client.RemoteEndPoint.AddressFamily, c.UserName);
  11.             }
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement