Socket.IO
Socket.IO is a real-time application framework that allows for cross-browser, real-time communication between a browser and server.
The lack of browser and server support for the emerging WebSocket standard means we cannot easily achieve real-time communication across browsers. In order to achieve this, Socket.IO supports multiple transport protocols including WebSockets, long polling, XHR, and flashsockets, that function as a fallback mechanism for older browsers. Browsers that do not support WebSockets will simply fall back to a transport protocol they do support.
Socket.IO comes in two parts: a server-side module and a client-side script. Both parts need to be installed in order for our application to support bidirectional duplex communication. Let's install the server piece via NPM:
npm install socket.io --save
Let's configure our application to use Socket.IO by updating our ./config/*.json
config files with the following configuration:
"sockets": { "loglevel": 3 , "pollingduration...