Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1.  try
  2.             {
  3.                     int BytesRead = networkStream.Read(bytes, 0, (int)bytes.Length); <--- IOException
  4.                     if (BytesRead > 0)
  5.                         // There might be more data, so store the data received so far.
  6.                         sb.Append(Encoding.ASCII.GetString(bytes, 0, BytesRead));
  7.                     else
  8.                         // All the data has arrived; put it in response.
  9.                         ProcessDataReceived();
  10.                
  11.  
  12.             }
  13.             catch (IOException)
  14.             {
  15.                 // All the data has arrived; put it in response.
  16.                 ProcessDataReceived();
  17.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement