This chapter will build upon the discussion in Chapter 3, Communication Protocols, of network architecture to trace the flow of data across a network, and break down the software you will write in C# to handle the data at each step in the process. We will explain the encapsulation of data into minimal packets for network transmission, and how that encapsulation helps to ensure that packets are delivered to the correct destination and are decoded properly. We will explain the concept of a data stream as a serialized sequence of discrete packets, and demonstrate the various ways that serialization can be executed in C#. Finally, we will demonstrate a variety of abstractions exposed by the System.IO namespace for handling streams.
The following topics will be covered in this chapter:
- Understanding how data moves through a network, and how the various layers of...