A shared read/write buffer is allocated the first time a BufferedStream object is initialized with this constructor. The shared buffer is not used if all reads and writes are greater than or equal to bufferSize.
// Create a NetworkStream that owns clientSocket and // then create a BufferedStream on top of the NetworkStream. // Both streams are disposed when execution exits the // using statement. using(Stream
netStream = new NetworkStream(clientSocket, true),
new BufferedStream(netStream, streamBufferSize))
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)