Chapter 23. Buckets of Sockets

So far, we’ve had some fun dealing with Erlang itself, but we’ve barely communicated with the outside world. And even when we did, it was only by reading the occasional text file. Though relationships with yourself might be fun, it’s time to get out of our lair and start talking to the rest of the world. One way to do this is by using sockets.

This chapter covers three components of using sockets: IO lists, UDP sockets, and TCP sockets.

image with no caption

IO Lists

As you’ve learned, for text, we can use either strings (lists of integers) or binaries (binary data structures that hold data). Sending things over the wire such as “Hello World” ...

Get Learn You Some Erlang for Great Good! now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.