O'Reilly logo

Foundations of Python Network Programming, Third Edition by John Goerzen, Brandon Rhodes

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

CHAPTER 5

image

Network Data and Network Errors

The first four chapters of this book showed how hosts are named on an IP network and how to set up and tear down both TCP streams and UDP datagram connections between hosts. But how should you prepare data for transmission? How should it be encoded and formatted? And for what kinds of errors will Python programs need to be prepared?

These questions are relevant regardless of whether you are using streams or datagrams, and this chapter provides all of the basic answers to them.

Bytes and Strings

Computer memory chips and network cards both support the byte as their common currency. This tiny 8-bit package ...

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