Npms_big

socket.io

2.1.0

node.js realtime framework server

(realtime, framework, websocket, tcp, events, socket, io)

Critical or Security advisories for 2.1.0

This version doesn't have any advisory. Want to report one?

Changelog for 2.1.0

Features

  • add a 'binary' flag (#3185)
// by default, the object is recursively scanned to check whether it contains some binary data
// in the following example, the check is skipped in order to improve performance
socket.binary(false).emit('plain-object', object);

// it also works at the namespace level
io.binary(false).emit('plain-object', object);
  • add support for dynamic namespaces (#3195)
io.of(/^\/dynamic-\d+$/).on('connect', (socket) => {
  // socket.nsp.name = '/dynamic-101'
});

// client-side
const client = require('socket.io-client')('/dynamic-101');

Bug fixes

  • properly emit 'connect' when using a custom namespace (#3197)
  • include the protocol in the origins check (#3198)

Important note :warning: from Engine.IO 3.2.0 release

There are two non-breaking changes that are somehow quite important:

  • ws was reverted as the default wsEngine (https://github.com/socketio/engine.io/pull/550), as there was several blocking issues with uws. You can still use uws by running npm install uws --save in your project and using the wsEngine option:
var engine = require('engine.io');
var server = engine.listen(3000, {
  wsEngine: 'uws'
});

Milestone: 2.1.0 Diff: 2.0.4...2.1.0 Engine.IO version: 3.2.x

Dependencies for 2.1.0

Name Requirement Status
~3.1.0

~3.2.0

0.3.1

~1.0.2

^3.5.3

Npms nyc
^11.2.1

~1.1.0

2.1.0

~3.2.0

^3.8.2

Display all

My projects using socket.io

Name Locked version Requirement
You should be logged in to see which of your projects use socket.io.