How to use the primus.call function in primus

To help you get started, we’ve selected a few primus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cayasso / primus.io / lib / index.js View on Github external
function PrimusIO(server, options) {
  if (!(this instanceof PrimusIO)) return new PrimusIO(server, options);

  Primus.call(this, server, options);

  this
    .use('primus.io.js', library, this.indexOfLayer('primus.js'))
    .plugin('multiplex', 'primus-multiplex')
    .plugin('emitter', 'primus-emitter')
    .plugin('rooms', 'primus-rooms')
    .remove('primus.js');
}

primus

Primus is a simple abstraction around real-time frameworks. It allows you to easily switch between different frameworks without any code changes.

MIT
Latest version published 12 months ago

Package Health Score

70 / 100
Full package analysis