Chapter 3. Using Socket Topology

We have looked at basic patterns such as pipeline, publish-subscribe, request-reply, detecting memory leaks, and also how to deal with the borderline of publish and subscribe. In this chapter, we are going to dig deep into sockets. First, let's start with a description of sockets.

What a socket is

Sockets are the de-facto standard API for performing network programming. The socket API is very similar to the file I/O in many aspects since we perform open, write, read, and close operations. They let us interact with other nodes in the network. There are several different kinds of sockets and they have different properties. The two most common families are:

  • PF_UNIX for Unix inter-process communication
  • PF_INET for Internet communication

However, we are going to look at DARPA Internet addresses (Internet sockets) since the most common ZeroMQ sockets are Internet sockets.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.35.77