.NET Buffering

Soldato
Joined
22 Mar 2008
Posts
11,922
Location
London
An app that I'm currently writing is going to pull data off the internet and then pass it via a named pipe to somewhere else

Now, the rate of data pull from the internet could potentially be faster than the "somewhere else" can read the named pipe, as such I need some means to buffer the data until it can be sent to the named pipe.

I know there is System.IO.BufferedStream, but can this handle data that is in the gigabytes potentially?

If you want to imagine what I'm up to, think of a video player that pre-loads the data it is going to play, but rather than having it just be a single file it is a continuous stream of data

Is there something in the .NET framework that can buffer a small amount of data in memory, but then automatically buffers the rest via a file on the hard drive ... but still allows for this buffered data to be modified prior to sending? (I want to be able to search and potentially drop parts/all of it)

or am I looking at having to write my own functions to do all that?
 
Thing is that I don't know much about buffers and performance, and cannot find anything on the net relating to the functionality that I need
(being able to preload anything from a few KB into memory to a large amount of data on the HDD, but also being able to search and drop (part or all) within BOTH of these types of buffer)
 
Back
Top Bottom