Socket.io v2.1.0 Release Notes
Release Date: 2018-03-29 // about 6 years ago-
๐ 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 performancesocket.binary(false).emit('plain-object', object);// it also works at the namespace levelio.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-sideconst 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 โ ๏ธ 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 (socketio/engine.io#550), as there was several blocking issues withuws
. You can still useuws
by runningnpm install uws --save
in your project and using thewsEngine
option:var engine = require('engine.io');var server = engine.listen(3000, { wsEngine: 'uws'});
0๏ธโฃ
pingTimeout
now defaults to 5 seconds (instead of 60 seconds): socketio/engine.io#551
Milestone: 2.1.0
Diff: 2.0.4...2.1.0
Engine.IO version: 3.2.x