Willy Nolan


Programming network sockets directly, rather than using an abstraction or library, is a challenging task.

This is true in any language that exposes network sockets whether it is C and C++, Python or Rust.

Challenging as though they may be to use directly, sockets provide an essential part of most modern computing, particularly interactive computing. Networked communication is often a preferred way to get devices to talk to each other, from microcontrollers and embedded devices to enterprise servers.

Furthermore, the basic API for sockets is actually not that complicated, with most of the semantics not changing much since Berkeley Sockets.

Today, modern operating systems still implement some version of the Berkeley socket interface.

To explore sockets further I created an application in C++ that allows a user to interactively:

The result was a greater appreciation for sockets and for the libraries and programs that make them easier to use.

Much of the code used was adapted from: