In: Computer Science
describing what WebSockets are and what is Socket.io. What are the parts of Socket.io?
WebSockets:
WebSocket is one of the revolutionary and innovative evolutions of client/server technology. It provides a channel to communicate between the client side browser and the server side application. It provides real-time communication between the client and the server. In this process, the client sends a request which consists of the upgrade header called as WebSocket handshake. This process is similar to request-response but with little tweaks. These tweaks include listening to reply from the server without even sending the request to the server. The server informs the client whenever the information is updated or available.
Socket.io:
Socket.io is a rich javascript library which provides real-time communications between the client and the server using WebSocket technology.
Parts of Socket.io:
Socket.io is backed by the NodeJS server as an event-driven response model. It also had a rich API access available. It consists of a javascript client which can be installed from the npm package manager. This client-side library runs in the client's browser.
This Socket.io is used by many companies for their products. Some of the best examples include Microsoft Office, Zendesk etc.