How to use base64id - 6 common examples

To help you get started, we’ve selected a few base64id 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 jondubois / nombo / node_modules / socketcluster-server / clusterserver.js View on Github external
ClusterServer.prototype.generateId = function (req) {
	var host;
	if (this.hostAddress) {
		host = this.hostAddress;
	} else {
		host = req.headers.host.match(this._hostRegex);
		if (host) {
			host = host[0];
		} else {
			host = '';
		}
	}
	var port = req.connection.address().port;
	return host + '_' + port + '_' + this.sourcePort + '_' + this.secure + '_' + base64id.generateId();
};
github socketstream / socketstream / node_modules / engine.io / lib / server.js View on Github external
Server.prototype.handshake = function(transport, req){
  var id = base64id.generateId();

  debug('handshaking client "%s"', id);

  var transportName = transport;
  try {
    var transport = new transports[transport](req);
    if ('polling' == transportName) {
      transport.maxHttpBufferSize = this.maxHttpBufferSize;
    }

    if (req._query && req._query.b64) {
      transport.supportsBinary = false;
    } else {
      transport.supportsBinary = true;
    }
  }
github willworks / nodeChat / example / node_modules / socket.io / node_modules / engine.io / lib / server.js View on Github external
Server.prototype.handshake = function(transport, req){
  var id = base64id.generateId();

  debug('handshaking client "%s"', id);

  var transportName = transport;
  try {
    var transport = new transports[transport](req);
    if ('polling' == transportName) {
      transport.maxHttpBufferSize = this.maxHttpBufferSize;
    }

    if (req._query && req._query.b64) {
      transport.supportsBinary = false;
    } else {
      transport.supportsBinary = true;
    }
  }
github booknds / sge / node_modules / browser-sync / node_modules / socket.io / node_modules / engine.io / lib / server.js View on Github external
Server.prototype.handshake = function(transport, req){
  var id = base64id.generateId();

  debug('handshaking client "%s"', id);

  var transportName = transport;
  try {
    var transport = new transports[transport](req);
    if ('polling' == transportName) {
      transport.maxHttpBufferSize = this.maxHttpBufferSize;
    }

    if (req._query && req._query.b64) {
      transport.supportsBinary = false;
    } else {
      transport.supportsBinary = true;
    }
  }
github jondubois / nombo / node_modules / socketcluster-server / node_modules / engine.io / lib / server.js View on Github external
Server.prototype.handshake = function(transport, req){
  var id = base64id.generateId();

  debug('handshaking client "%s"', id);

  try {
    var transport = new transports[transport](req);
  }
  catch (e) {
    sendErrorMessage(req.res, Server.errors.BAD_REQUEST);
    return;
  }
  var socket = new Socket(id, this, transport);
  var self = this;

  if (false !== this.cookie) {
    transport.on('headers', function(headers){
      headers['Set-Cookie'] = self.cookie + '=' + id;
github alvaropaco / ChatWithAndroid-SocketIO / node_modules / socket.io / node_modules / engine.io / lib / server.js View on Github external
Server.prototype.handshake = function(transport, req){
  var id = base64id.generateId();

  debug('handshaking client "%s"', id);

  var transportName = transport;
  try {
    var transport = new transports[transport](req);
    if ('polling' == transportName) {
      transport.maxHttpBufferSize = this.maxHttpBufferSize;
    }

    if (req._query && req._query.b64) {
      transport.supportsBinary = false;
    } else {
      transport.supportsBinary = true;
    }
  }

base64id

Generates a base64 id

MIT
Latest version published 5 years ago

Package Health Score

68 / 100
Full package analysis

Popular base64id functions