September 2014
Intermediate to advanced
316 pages
7h 6m
English
We are not going to completely dive into everything that Socket.IO does, but we will discuss a few topics.
This is what makes Socket.IO work. All web servers serve HTTP, that is, what makes them web servers. This works great when all you want to do is serve pages. These pages are served based on requests. The browser must ask for information before receiving it. If you want to have real-time connections, though, it is difficult and requires some workaround. HTTP was not designed to have the server initiate the request. This is where WebSockets come in.
WebSockets allow the server and client to create a connection and keep it open. Inside of this connection, either side can send messages back and forth. This is ...