Skip to Content
Learning API Styles
book

Learning API Styles

by Lukasz Dynowski, Marcin Dulak
July 2025
Intermediate to advanced
414 pages
10h 22m
English
O'Reilly Media, Inc.
Book available
Content preview from Learning API Styles

Chapter 3. Network

In Chapter 1, we explored the common concepts of data exchange over computer networks, such as transmission modes and synchronicity. This chapter introduces you to network protocols. It explains why network protocols and their programmatic APIs are needed and how they are used. These concepts are demonstrated in practice by implementing a Transmission Control Protocol (TCP) ECHO server and clients. Throughout the chapter, you’ll become familiar with software tools like netcat, scapy, openssl, tcpdump, and tshark, and use them to explore the basics of the TCP and Transport Layer Security (TLS) protocols. This will help you understand how various APIs discussed in this book communicate over the network.

Network Protocols

Have you wondered what happens on the network level when a browser opens a website? The goal of this chapter, and the following Chapter 4, is to examine some of the details of how this network communication is performed.

The purpose of networking is to enable communication by facilitating data exchange. Since today’s computers are binary, networking is about getting the 0s and 1s from one side of the communication to another.

Note

The communication channel used to exchange binary data doesn’t need to be binary itself. For example, a homing pigeon can help transfer chunks of binary data.

As an example, let’s take a copper cable used in computer networks. How do we identify the data being transmitted between the sender and receiver? First, how ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

API Design Patterns

API Design Patterns

John J. Geewax
Designing APIs with Swagger and OpenAPI

Designing APIs with Swagger and OpenAPI

Lukas Rosenstock, Joshua Ponelat
Learning TypeScript

Learning TypeScript

Josh Goldberg

Publisher Resources

ISBN: 9781098153984Errata Page