StreamReader not reading all lines

G

Guest

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?
 
C

Cool Guy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top