How to use the @feathersjs/transport-commons.socket function in @feathersjs/transport-commons

To help you get started, we’ve selected a few @feathersjs/transport-commons 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 feathersjs / feathers / packages / primus / lib / index.js View on Github external
primus.on('disconnection', spark => app.emit('disconnect', getParams(spark)));
          }

          if (typeof configurer === 'function') {
            debug('Calling Primus configuration function');
            configurer.call(this, this.primus);
          }

          resolve(this.primus);

          return this._super.apply(this, arguments);
        }
      }, app);
    });

    app.configure(commons({
      done,
      socketMap,
      getParams,
      emit: 'send'
    }));
  };
}
github feathersjs / feathers / packages / socketio / lib / index.js View on Github external
io.sockets.setMaxListeners(64);
          }

          if (typeof config === 'function') {
            debug('Calling SocketIO configuration function');
            config.call(this, this.io);
          }

          resolve(this.io);

          return this._super.apply(this, arguments);
        }
      }, app);
    });

    app.configure(commons({
      done,
      socketMap,
      getParams,
      emit: 'emit'
    }));
  };
}

@feathersjs/transport-commons

Shared functionality for websocket providers

MIT
Latest version published 2 months ago

Package Health Score

92 / 100
Full package analysis