Socket.io - sarahduv-401-advanced-javascript/seattle-javascript-401d32 GitHub Wiki
What is Socket.io?
- It is a JavaScript library for real-time web applications. It enables real-time, bi-directional communication between web clients and servers. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have an identical API.
Why use Socket.io?
- Traditionally, it was very hard to establish connections between a client and a server. Socket.io makes it easier.
How does Socket.io make it easier?
- Socket.io listens for an event to occur. The idea is that the server will get it and push it to the concerned connected clients.
Examples
- Instant messengers − Chat apps like Whatsapp, Facebook Messenger, etc. You need not refresh your app/website to receive new messages.
- Push Notifications − When someone tags you in a picture on Facebook, you receive a notification instantly.
- Collaboration Applications − Apps like google docs, which allow multiple people to update same documents simultaneously and apply changes to all people's instances.
- Online Gaming − Games like Counter Strike, Call of Duty, etc., are also some examples of real-time applications.
Source: https://www.tutorialspoint.com/socket.io/socket.io_overview.htm