20 Socket Server
Just as iron rusts out of use and stagnant water spoils or freezes in the cold, so the mind degenerates without exercise.—Leonardo da Vinci
This chapter describes the concept of sockets in Node.js. Sockets are mainly used for the communication between applications. It isn’t mandatory for applications to run on the same system. In this chapter, you’ll learn how you can create both servers and clients for the various sockets.
Sockets in Node.js are nothing more than data streams and as such are based on the stream module. As you already know from Chapter 18, this module is an abstraction layer that provides a unified interface to the various data streams. You can use a data stream to send or receive data to or from a remote system. ...
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.
Read now
Unlock full access