Socket.IO

from Wikipedia, the free encyclopedia
Socket.IO
Basic data

developer Automattic
Current  version 2.0.3
(June 13, 2017)
operating system Cross-platform
programming language JavaScript
category event-driven web software
License MIT License
Socket.IO

Socket.IO is a JavaScript library for real-time web applications . It enables bidirectional real-time communication between web clients and servers. It consists of two parts: a client-side library that the browser runs the user, and a server-side library for Node.js . Both components have an almost identical API . Like Node.js, it is event driven .

Socket.IO primarily uses the WebSocket protocol with cyclical polling as a replacement option, although it offers the same interface. While it can also be used as a simple wrapper for WebSocket, it offers far more functionality, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I / O.

It can be installed with the help of the package manager npm .

overview

Socket.IO offers real-time analysis, binary data streams, instant messaging and collaboration on documents. Notable users include Microsoft Office , Yammer and Zendesk .

Socket.IO handles the connection transparently. It automatically switches to the WebSocket protocol if possible. As a result, the programmer only needs knowledge of Socket.IO.

Socket.IO is not a WebSocket library with replacement options for other real-time protocols. It is an adapted implementation of a real-time transport protocol based on other real-time protocols. Its protocol negotiation parts ensure that a client that supports standard WebSocket will not be able to connect to a Socket.IO server. And a Socket.IO-implementing client cannot communicate with a non-Socket.IO-based WebSocket or long polling Comet server. Therefore, Socket.IO requires the use of the Socket.IO libraries on both the client and the server.

As of version 2.0, Socket.IO uses µWebSockets as the underlying WebSocket library.

Web links

Individual evidence

  1. socketio / engine.io . In: GitHub .
  2. Socket.io . In: npmjs.org .
  3. faq - npm Documentation . In: npmjs.com . Archived from the original on November 25, 2015. Info: The archive link was automatically inserted and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved February 16, 2015. @1@ 2Template: Webachiv / IABot / docs.npmjs.com
  4. Paul Krill: Socket.IO JavaScript framework ready for real-time apps . In: InfoWorld . 2nd June 2014.
  5. Damien Arrachequesne: Socket.IO 2.0.0 release post . May 13, 2017.