How to use the spdy.server function in spdy

To help you get started, we’ve selected a few spdy 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 igrigorik / node-spdyproxy / lib / server.js View on Github external
}
        );
      });
    } else { // auth is not necessary, simply go ahead and dispatch to funcs
      dispatcher(req, res);
    }

  }

  spdy.server.Server.call(this, options);

  this.on("connect", handleRequest);
  this.on("request", handleRequest);
};

util.inherits(SPDYProxy, spdy.server.Server);

var createServer = function(options) {
  return new SPDYProxy(options);
};

exports.SPDYProxy = SPDYProxy;
exports.createServer = createServer;
github mozilla / node-janus / lib / proxy.js View on Github external
} catch (error) {
      log.error('synReply error: ' + error.message);
      callback.call();
    }
  }

  spdy.server.Server.call(this, {
    key: fs.readFileSync(options.proxy.sslKeyPath),
    cert: fs.readFileSync(options.proxy.sslCertPath)
  });

  this.on('connect', handleConnect);
  this.on('request', handleRequest);
  this.on('listening', handleListen);
};
util.inherits(SpdyProxy, spdy.server.Server);

module.exports = SpdyProxy;

module.exports.log = log;
github xkxx / node-spdy-proxy / server.js View on Github external
common.watchUserDB(this, config.user_db);
	}

	this.maxConnections = config.maxConnections;
	this.maxHeadersCount = 60;

	this._listen = this.listen;
	this.listen = function(port) {
		this._listen(port? port : config.port, config.host);
		this.log('Server up listening at ' + config.host + ':' + config.port);
			process.on('uncaughtException', function(e) {
				self.log('[uncaughtException]: '+ e.message);
			});
	};
};
common.inherits(Server, spdy.server.Server);

exports.Server = Server;

var createServer = function(config, overrides) {
	return new Server(config, overrides);
};
exports.createServer = createServer;

var connectionHandler = function(client) {
	var debug, connection, IP, conID, user;
	debug = this.debug;
	connection = client.socket;
	IP = connection.IP = connection.remoteAddress;
	conID = connection.conID = IP + ':' + connection.remotePort;
	try {
		user = connection.user = this.userDB[connection.getPeerCertificate().fingerprint];

spdy

Implementation of the SPDY protocol on node.js.

MIT
Latest version published 5 years ago

Package Health Score

76 / 100
Full package analysis