Repository  -  API  -  Source


  • update return server instance farmisen
  • update examples


  • add socket.broadcast helper for broadcast emit




  • add allow passing options to instance
  • update attach raw instance
  • update attach IO instance for default namespace
  • fix use new identifier type
  • update dependencies
  • fix attach IO instance and not the raw socket for namespaced instances

Breaking changes

  • koaSocket now attaches instances of itself to the app, whereas previously it attaches the instance. This facilitates accessing koaSocket instances from any app middleware without having to pass it around as a dependency, the raw instance is still available as koaSocket.socket.
  • The raw instance is now attached as ._io, whilst the default namespace becomes .io if it exists.
  • Made it explicit that koaSocket only supports node v4 as its lowest version.


  • add namespace support
  • add configure namespaces attaching to the app using hidden
  • add 1-arity constructor


  • add allow runtime updates to middleware and listeners
  • update test coverage
  • add remove event listeners


  • update use class notation
  • update performance improvements by composing middleware in the socket constructor rather than every event
  • add broadcast to all connections
  • add test sling
  • update throw error on failure to attach socket to koa

Breaking changes

  • koaSocket exposes an IO class, which must be instantiated. This is the same as instantiating a koa v2 app.
  • start is renamed to attach. Start is misleading, more so than attach which at least does attach to a koa-callback-powered listener.
  • The context packet returned with each event now contains a Socket instance, rather than just the raw socket


November 11, 2015
  • add koa v2 compatibility
  • update middleware composition

Breaking changes

  • Middleware should now be passed co wrapped generators, similar to one method of using koa.
  • Context is shifted from this to the ctx parameter, which is passed through middleware to event listeners and is mutable.



  • add - explicit on and off connection callbacks
  • fix - disconnect handler only once


  • add - list of open connections
  • add - remove a connection
  • add - allow creation of middleware chain
  • add - start server convenience function
  • add - expose connected socket


  • add - wrapper around attaching listeners to a socket instance