Chapter 15. Networking, Sockets, and Daemons

In this chapter, we're going to look at how to use Ruby to perform network-related operations, how to create servers and network services, and how to create persistent processes (daemons) that can respond to queries over a network.

Chapter 14 looked at Ruby's Internet capabilities from a high level, like making requests to web sites, processing HTML, working with XML, retrieving e-mail, and managing files over FTP. In contrast, this chapter looks at networking and network services at a lower level, and works through to creating your own basic protocols and permanently running service processes.

Let's start with a look at the basic networking concepts we'll be using in this chapter.

Networking Concepts ...

Get Beginning Ruby: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.