R
Radu Nica
Hey all,
I have an application that uses StreamReader and StreamWriter to call an
external command-line based process using the Process object. The process
varies the amount of data returned. I am using the StreamReader ReadtoEnd()
method to get the process' results.
Problem is, the application will work when returning a relatively small
amount of data, but after a certain threshold, the application will hang and
no data will be returned. From informal tests I've been running, it seems
there is a buffer issue somewhere (I suspect with the StreamReader).
How does one increase the size of the buffer? Are there advantages for using
ReadtoEnd vs. ReadLine? (I tried both ways and didn't seem to make a
difference)...
Thanks.
Radu
I have an application that uses StreamReader and StreamWriter to call an
external command-line based process using the Process object. The process
varies the amount of data returned. I am using the StreamReader ReadtoEnd()
method to get the process' results.
Problem is, the application will work when returning a relatively small
amount of data, but after a certain threshold, the application will hang and
no data will be returned. From informal tests I've been running, it seems
there is a buffer issue somewhere (I suspect with the StreamReader).
How does one increase the size of the buffer? Are there advantages for using
ReadtoEnd vs. ReadLine? (I tried both ways and didn't seem to make a
difference)...
Thanks.
Radu