Skip to content

Releases: fullstackers/socket.io-events

Code Clean-up

28 Oct 14:11
Compare
Choose a tag to compare

Socket Wrapper Updates

27 Oct 14:37
Compare
Choose a tag to compare

Removed the hardcoded delegations from the Socket class to the socket instance.

Bug Fixes

11 Sep 15:20
Compare
Choose a tag to compare

The socket.io Socket instance's emit was being manipulated which prevented other events happening concurrently from being processed. The socket.io socket instance is now wrapped in a proxy object. The proxy object is manipulated now instead of the actual socket.io Socket instance.

Bug Fixes

29 Jun 17:35
Compare
Choose a tag to compare

There was an issue with event consumption. Events are now properly consumed when you call socket.emit(...).

Pattern Matching Events

28 Jun 08:35
Compare
Choose a tag to compare

Events can now be matched via RegExp and wildcards.

var router = require('socket.io-events')();
router.on(/^\w+/, function (sock, args, next) {
  // do something but don't consume it!
  next();
});
router.on('*thing', function (sock, args, next) {
  // do something but don't consume it!
  next();
});
router.on('some*', function (sock, args, next) {
  // do something but don't consume it!
  next();
});

var io = require('socket.io')(3000);
io.use(router);
io.on('connection', function (sock) {
  sock.on('something', function (data) {
    sock.emit('something', data);
  });
});

Bug Fixes

28 Jun 07:30
Compare
Choose a tag to compare

There was an issue where an event would go back through the router stack under some circumstances.

Bug Fixes

28 Jun 05:40
Compare
Choose a tag to compare

Fixed an issue where their are no handlers in the router.

Bug Fixes

28 Jun 00:11
Compare
Choose a tag to compare

Routers were not playing nice when next to each other.

var io = require('socket.io')(3000):
io.use(Router());
io.use(Router());

The second Router instance was overrode the socket.onevent method when in fact it should have just attached it self to the previous router.

Stackable Router instances

27 Jun 23:33
Compare
Choose a tag to compare

Router instances are now stackable

var  Router = require('socket.io-events');
var a = Router();
var b = Router();
a.use(b);
var io = require('socket.io')(3000);
io.use(a);