This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 19th, 2013  |  syntax: None  |  size: 0.30 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. client.Connect("192.168.1.100",80);
  2. Stream s = client.GetStream();
  3. StreamReader sr = new StreamReader(s);
  4. StreamWriter sw = new StreamWriter(s);
  5. String r = "";
  6. sw.AutoFlush = true;
  7.  
  8. while(true)
  9. {
  10.     r = sr.ReadLine();
  11.     Console.WriteLine(r);
  12.     Debug.WriteLine(r);
  13.     if (sr.Peek() < 0) break;
  14. }
clone this paste RAW Paste Data