Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- int BytesRead = networkStream.Read(bytes, 0, (int)bytes.Length); <--- IOException
- if (BytesRead > 0)
- // There might be more data, so store the data received so far.
- sb.Append(Encoding.ASCII.GetString(bytes, 0, BytesRead));
- else
- // All the data has arrived; put it in response.
- ProcessDataReceived();
- }
- catch (IOException)
- {
- // All the data has arrived; put it in response.
- ProcessDataReceived();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement