StreamReader not reading all lines

  • Thread starter Thread starter Guest
  • Start date Start date
Well, that may be the problem. Just to clarify, if I'm writing to the stream
at the exact instant the server responds, the streamReader should still
receive the data, but only if the stream reader is in another thread?
 
JoKur said:
Just to clarify, if I'm writing to the stream
at the exact instant the server responds, the streamReader should still
receive the data, but only if the stream reader is in another thread?

(This is designed to be viewed with a fixed-width font.)

Not exactly. The distinction follows.

If, while you're in the process of writing to the NetworkStream, the server
respond --

a. if you're using a single thread for both reading and writing, then
you won't be able to read the response until the write operation has
completed (or has been interrupted); or

b. if you're using one thread for reading and another for
writing, then you won't have to wait for the write operation to
complete (or be interrupted) before you can start reading.
 
Back
Top