Socket.IO
Socket.IO is a JavaScript library for real-time web applications . It enables real-time two-way communication between the server and the client. It has two parts: a client library that runs in the browser , and a server library for Node.js. Both have almost the same API . Like Node.js, it is event-driven.
original author | Guillermo Rauch |
---|---|
current version |
|
Source code repository | |
programming language | JavaScript |
operating system | Cross-platform |
type | event driven network |
agreement | MIT license |
website | socket.io |
Socket.IO mainly uses the WebSocket protocol. But if needed, Socket.io can fall back to several other methods, such as Adobe Flash Sockets, JSONP pulls, or traditional AJAX pulls , while providing the exact same interface. Although it can be used as a wrapper library for WebSocket, it provides many other features, such as broadcasting to multiple sockets, storing data related to different clients, and asynchronous IO operations.
It can be installed using the npm (node package) tool.
Advantage
Socket.IO automatically selects the appropriate bidirectional communication protocol and only requires the programmer to have some understanding of the concept of sockets.
Disadvantages
Socket.io is not a basic, independent WebSocket library that can fall back to other real-time protocols. It is actually an implementation of a custom real-time transport protocol that relies on other real-time transport protocols. The negotiation part of the protocol is such that clients that support standard WebSocket cannot connect directly to a Socket.io server, and clients that support Socket.io cannot communicate with non-Socket.io framework WebSocket or Comet servers. Therefore, Socket.io requires both the client and server to use the framework.
References
- ^ . June 28, 2023 [July 2, 2023].
- ^ http://github.com/LearnBoost/socket.io/blob/master/LICENSE
- ^ . [2014-10-04]. ( Archived from the original on 2016-06-07).
- ^ . [2014-10-04]. ( Archived from the original on 2014-10-06).
external link
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.