Understanding Data Streams in Computer Networking

Lucas PenzeyMoog
The Startup
Published in
4 min readMay 31, 2019

--

This post will build off of my last article, Understanding Sockets in Computer Networking, as I’m continuing to blog about my experience with building an HTTP server in Java.

For the full (introductory) story on sockets just go read the previous post, but to sum it up, sockets in computer networking are the connection points between two software programs. But what’s going on in-between those sockets in terms of information sharing? The answer is streams, which is what we’re going to be exploring today.

The standard definition of a stream in computer science is “a sequence of data elements made available over time”. One of the main differentiators here is the “available over time” aspect of streams. This means that streams have no concept of indexing or traversal, like you would be able to do with an array.

Computers come with three standard streams pre-connected: standard in (stdin), standard out (stdio) and standard err (stderr). These are what the computer uses to receive data from a keyboard, send data to a screen, and write errors to a log file.

These three streams handle a lot of the day to day functions for a single computer, but communication between computers also utilizes data streams. A single stream is useful, but when talking about computer networking it’s often necessary…

--

--