This is a nice, deep primer on WebSockets. It includes some web history, describes WebSockets in detail, and catalogs available libraries you can use to get started with them. Here’s the intro to the topic:
In a nutshell, WebSockets are a thin transport layer built on top of a device’s TCP/IP stack. The intent is to provide what is essentially an as-close-to-raw-as-possible TCP communication layer to web application developers while adding a few abstractions to eliminate certain friction that would otherwise exist concerting the way the web works.