For most applications, the transition to 1.0 should be completely seamless and devoid of any hiccups. That said, we’ve done some work to streamline some APIs, and we have changed some internals, so this is a recommended read for most existing users.

Authentication differences

Socket.io uses middleware now

You can give a Socket.io server arbitrary functions via io.use() that are run when a socket is created. Check out this example:

Parser / Protocol differences

This is only relevant for updating things like socket.io implementations in other languages, custom socket.io clients, etc.

Difference 1 – packet encoding

Parsing is now class based and asynchronous. Instead of returning a single encoded string, encode calls callback with an array of encodings as the only argument. Each encoding should be written to the transport in order. This is more flexible and makes binary data transport work. Here’s an example:

var decoder = new parser.Decoder();decoder.on('decoded', function(packet) {console.log(packet); // formed socket.io packet to handle});decoder.add(encodings[0]); // say encodings is array of two encodings received from transportdecoder.add(encodings[1]); // after adding the last element, 'decoded' is emitted from decoder