Strange problem of "read" method of filestream class.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use "read" method to read some blocks into a buffer from a filestream, and send data in the buffer to remote server with "send" method of cocket class. For certain computers, I have to add "sleep" commands after read, otherwise no data is sent to remote server

Who can help me how to check if the data are filled into the buffer fully after read?
 
Poseidon said:
I use "read" method to read some blocks into a buffer from a
filestream, and send data in the buffer to remote server with "send"
method of cocket class. For certain computers, I have to add "sleep"
commands after read, otherwise no data is sent to remote server.

You don't send data using Read, you send it using Write.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Back
Top