Socket.IO

From Wikipedia, the free encyclopedia
  (Redirected from Socket.io)
Jump to: navigation, search
Socket.IO
Original author(s) Guillermo Rauch
Stable release 1.3.4 / February 14, 2014 (2014-02-14)
Development status Active
Written in JavaScript
Operating system Cross-platform
Type Event-driven networking
License MIT License[1]
Website socket.io

Socket.IO is a JavaScript library for realtime web applications. It enables realtime, bi-directional communication between web clients and server. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven.

Socket.IO primarily uses the WebSocket protocol with polling as a fallback option,[2] while providing the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.

It can be installed with the npm tool.[3][4]

Uses[edit]

Socket.IO provides the ability to implement real-time analytics, binary streaming, instant messaging, and document collaboration.[5] Notable users include Microsoft Office, Yammer, and Zendesk.[6]

Advantages[edit]

Socket.IO handles the connection transparently. It will automatically upgrade to WebSocket if possible. This requires the programmer to only have Socket.IO knowledge.

Disadvantages[edit]

Socket.IO is not a WebSocket library with fallback options to other realtime protocols. It is a custom realtime transport protocol implementation on top of other realtime protocols. Its protocol negotiation parts cause a client supporting standard WebSocket to not being able to contact a Socket.IO server. And a Socket.IO implementing client cannot talk to a non-Socket.IO based WebSocket or Long Polling Comet server. Therefore Socket.IO requires using the Socket.IO libraries on both client and server side.

External links[edit]

References[edit]

  1. ^ https://github.com/Automattic/socket.io/blob/master/LICENSE
  2. ^ https://github.com/Automattic/engine.io
  3. ^ https://npmjs.org/package/socket.io
  4. ^ https://docs.npmjs.com/misc/faq#if-npm-is-an-acronym-why-is-it-never-capitalized
  5. ^ socket.io
  6. ^ http://www.infoworld.com/article/2607757/javascript/socket-io-javascript-framework-ready-for-real-time-apps.html