int bufferSize = 8192;
Byte[] buffer = new Byte[bufferSize];
I need to read from NetworkStream, which will have a continuous stream of incoming data at high speed. I wanted to know
- What should be the basis for setting the value
bufferSize? - Is there a standard “safe” value that can be selected independently of enviornment?
- Should it also change in the stream I'm trying to read (FileStream / NetworkStream / ..)?
Please consider performance as a focus point for evaluation.
source
share