If all this talk of the web socket protocol and its functioning sounded complex, that's because it is. We could make this entire implementation ourselves and spend a few days or even weeks on it, but as with previous chapters, the boring stuff is already taken care of by an external library called socket.io https://socket.io/.
Socket.io provides both client-side and server-side libraries and abstracts away most of the complicated stuff, such as establishing a connection and pushing information, and abstracts it behind a convenient API for developers to use.