mattstyles / koa-socket

Sugar for connecting socket.io to a koa instance
242 stars 50 forks source link

Namespaces don't have a broadcast method #7

Closed multimeric closed 8 years ago

multimeric commented 8 years ago

Contrary to the example code, this doesn't actually work:

const IO = require('koa-socket');
const app = require('koa')();
const chat = new IO({
  namespace: 'chat'
})

chat.attach( app )

app.chat.broadcast('event')

app.chat.broadcast is not a function

mattstyles commented 8 years ago

This should be fixed with this commit.