This produces messages as it listens for events on a socket.