O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Streams Are Everywhere

Streams are a very useful abstraction that’s used far beyond just file I/O operations. As you explore the .NET Framework, you’ll find plenty of places where streams are used. Examples include the NetworkStream class in System.Net.Sockets, which represents the data coming from or being sent to a socket, using protocols such as TCP or UDP. Yet another place where sockets are used is in low-level data access (for example, for what’s known as file streams in SQL Server 2008 and later). Exposing them to managed code uses the concept of a SqlFileStream, which encapsulates the communication with the server over the Tabular Data Stream (TDS) protocol.

Often, streams are also used “over” other streams. An example is compression, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required