How to use the engine.io-parser.encodePayload function in engine

To help you get started, we’ve selected a few engine 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 Ezelia / eureca.io / lib / js / primus.js View on Github external
Polling.prototype.write = function(packets){
  var self = this;
  this.writable = false;
  var callbackfn = function() {
    self.writable = true;
    self.emit('drain');
  };

  var self = this;
  parser.encodePayload(packets, this.supportsBinary, function(data) {
    self.doWrite(data, callbackfn);
  });
};
github iamdjones / sublime-text-browser-sync / node_modules / browser-sync / node_modules / engine.io-client / lib / transports / polling.js View on Github external
Polling.prototype.write = function(packets){
  var self = this;
  this.writable = false;
  var callbackfn = function() {
    self.writable = true;
    self.emit('drain');
  };

  var self = this;
  parser.encodePayload(packets, this.supportsBinary, function(data) {
    self.doWrite(data, callbackfn);
  });
};
github iamdjones / sublime-text-browser-sync / node_modules / browser-sync / node_modules / engine.io / lib / transports / polling.js View on Github external
Polling.prototype.send = function (packets) {
  if (this.shouldClose) {
    debug('appending close packet to payload');
    packets.push({ type: 'close' });
    this.shouldClose();
    this.shouldClose = null;
  }

  var self = this;
  parser.encodePayload(packets, this.supportsBinary, function(data) {
    self.write(data);
  });
};
github socketstream / socketstream / node_modules / engine.io / lib / transports / polling.js View on Github external
Polling.prototype.send = function (packets) {
  if (this.shouldClose) {
    debug('appending close packet to payload');
    packets.push({ type: 'close' });
    this.shouldClose();
    this.shouldClose = null;
  }

  var self = this;
  parser.encodePayload(packets, this.supportsBinary, function(data) {
    self.write(data);
  });
};
github jucimarjr / html5games / phaser / DominoMultiplayer / shared / socket.io / node_modules / engine.io / lib / transports / polling.js View on Github external
Polling.prototype.send = function (packets) {
  if (this.shouldClose) {
    debug('appending close packet to payload');
    packets.push({ type: 'close' });
    this.shouldClose();
    this.shouldClose = null;
  }

  var self = this;
  parser.encodePayload(packets, this.supportsBinary, function(data) {
    self.write(data);
  });
};

engine

Template engine based on Lo-Dash template, but adds features like the ability to register helpers and more easily set data to be used as context in templates.

MIT
Latest version published 5 years ago

Package Health Score

51 / 100
Full package analysis